SOLVED:
I want many different LEDs to light up in a position intended for them. I use the FastLed library. My approach was to write all colors into an array and then retrieve them in the code below. But I can only retrieve the variable “CRGB::White” from the array, e.g. “CRGB::Red” does not work. If I insert “CRGB::Red” directly into line 29 it works. Nothing happens with the red from the array above.
Can anyone tell me why I can only retrieve white from the array and how I get my 160 different colors into an array so I can retrieve them in different scenarios?
I tried all sorts of things which could cause the syntax or something else to be wrong but it didn’t work.
@Leander_Reichstein - Look at my following sketch which uses an array of CRGB colors ( see line 21) and the functions that uses colors from that array (see lines 45 and 48 for one example):
For picking a certain color from the many colors that you want to use, you might want to consider using the variable “hue” to set the color as in:
leds[i] = CHSV(hue, 255, 255);
see:
to learn about how to use hue in CHSV(hue, 255, 255) to set a color.