I’m using FastLED with NeoPixel try wo write my first code. I wonder if it is possible to save a color into a variable and use it in every subroutine. At the moment I use CRGB::White in several line but I want to make it changeable only in the beginning of my code. Any help is appreciated.
I also want to change the brighness of single pixels in my stripe without using the dimming / fading functions. Unfortunately I’m only able to set the brightness for the complete stripe or uns e.g. fadebylight for single pixels.
To save and use a variable, just use CRGB c = CRGB::color. YOu can make that variable global just like your leds[] array.
If you want to act on a single pixel, you can use CHSV and change the s value of the CHSV structure, or you can do math on individual pixels and dim them yourself.
@Peter_Buelow Hi Peter, Thank you very much for coming back to my question. I’m still confused about using CHSV to set the pixel brightness. I use it like this: