Wrong color of leds

#1

Hello,

I have a LED color problem on the ring ws2812. Red and green are reversed. :face_with_raised_eyebrow:

The problem appears, for example, with the commands:
fill_solid (leds, NUM_LEDS, CRGB :: Red);
or
fill_solid (leds, NUM_LEDS, 0x00FF00);

The following codes give me the respective colors:

  • 0x00FF00 => red
  • 0xFF0000 => green
  • CRGB::Red => green
  • CRGB::Green => red
  • CRGB::Blue => blue

Do you have an idea ?
It’s on ESP32 and firmware from CKUL :


Thank you in advance

0 Likes

#2

Your Strip has Red and Green swapped. Change this:

to this:

FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);

0 Likes

#3

Thank you so much !!! It works !

I saw the 2 variables LED_TYPE and COLOR_ORDER at the beginning of the code, but they were not used … I understand better now where they were to serve.

0 Likes