I am using a led strip WS2812b, an ESP8266 (NodeMCU 1.0) and a gesture sensor APDS9960. I want that when I move my hand from left to right and from right to left I change the colors of the strip of leds, previously saved in an array of strings:
const char * colors [11] = {"CRGB :: White",
"CRGB :: WhiteSmoke",
"CRGB :: CadetBlue",
"CRGB :: SteelBlue",
"CRGB :: Teal",
"CRGB :: SlateGray" ,
"CRGB :: MediumPurple",
"CRGB :: Purple",
"CRGB :: PapayaWhip",
"CRGB :: LightPink",
"CRGB :: Crimson"};
But when I'm going to turn on the colors using the functions of the FastLed library in this way:
for (int i = 0; i <NUM_LEDS; i = i + 1) {
leds [i] = colors [2];
FastLED.show ();
delay (10);}
All I get is this error:
invalid conversion from 'const char *' to 'uint32_t {aka unsigned int}' [-fpermissive]
I guess the problem is me when declaring the array, could someone help me?