I am using the newest FastLED library with my Arduino Uno R3 and a

I am using the newest FastLED library with my Arduino Uno R3 and a WS2812B RGB LED strip of 30 LEDs.

When I set an LED to red, the color is green.
When I set an LED to green, the color is red.

Yet when I use Adafruit’s Neopixel library, there is no color reversal.

Below is the code. What am I doing wrong?

#include “FastLED.h”
// Number of RGB LEDs in the strand
#define NUM_LEDS 30

// Define the array of leds
CRGB leds[NUM_LEDS];

// Arduino pin used for Data
#define PIN 6

void setup()
{
FastLED.addLeds<NEOPIXEL, PIN, RGB>(leds, NUM_LEDS);
}

void loop() {
leds[10] = CRGB::Red; // Set LED 10 to red

FastLED.show(); // Show changes
}

See https://github.com/FastLED/FastLED/wiki/Rgb-calibration

But why does it work with Adafruit’s Neopixel library?

I did run the RGB calibration and it is 1 green, 2 red, 3 blue.

I would try either:

FastLED.addLeds<WS2811, 6, GRB >(leds, NUM_LEDS);

or
FastLED.addLeds<WS2811, 6, RGB >(leds, NUM_LEDS);

@Andrew_Tuline If you use NEOPIXEL, you don’t need to state the RGB order!

Jon, Can you explain why it is that I don’t need to state the RGB order when using NeoPixel? Does it do an automatic detect?

The library was written like that