Has someone used the function to initialize a chip with changed RGB order?

Has someone used the function to initialize a chip with changed RGB order?
I have tried the code behind the link, but it seems like its ignored…

http://pastebin.com/4D0jP2Z0

Uh, should have been in support… :-/

You are the second person to make this mistake - can you point me to the example code or documentation that led to you writing this line:

LEDS.addLeds<WS2811, 11>(leds, NUM_LEDS, GRB);  

The RGB ordering goes in the <>'s, not the ()'s - it should be:

LEDS.addLeds<WS2811, 11, GRB>(leds, NUM_LEDS);

I’m concerned that there’s a bad line somewhere and I want to make sure it gets fixed before I push the next update.

Thank you!

(Also, perfectly fine to have this in discussion vs. support, no worries on that front).

im using the 2801 leds, so similar.

and if i understand your problem, its that the RGB is the wrong way around.

on mine i change the RGB to the order that makes sense;
in yours its GRB, you can move the letters around to suit.

LEDS.addLeds<WS2811, 11>(leds, NUM_LEDS, GRB);

in your example, if you run it from the off, then the bottom line kicks in;
LEDS.showColor(CRGB::Red);

if i comment this line out and uncomment the the two tests, then they run as expected.

i see in your example that you are running with the colours on really low numbers 10 / 20 etc… i didnt get any flickering with these numbers, but you may find it easier to use big numbers (255,0,0) for red, and then use the;

void setup() {
LEDS.setBrightness(64);

as a master brightness.

when i did have flickering (albeit not in this test), it was down to not connecting the grounds of the arduino and the leds together.

Kelvin, you are also mistaken - the GRB does not go in the (), it goes in the <>. LEDS.addLeds<WS2811, 11, GRB>(leds, NUM_LEDS). (That it does anything at all/compiles is a quirk of C++)

i must admit, when i looked at the problem, i looked at my working program which indeed does have the RGB outside the brackets, but then i copied his code to illustrate.

my sole learning of c++ is from this community! :slight_smile:

I’ve never seen the color order being defined inside of the () … so yeah, I’m curious as to where folks are picking it up …

Year, it works fine that way you suggest :wink:
I think the problem is the documentation. I found this “enum EOrder…” while looking at the code if i could change the order in the CRGB definition… So the only few lines about changed RGBs is on the Googlecode page where it says “…may be something like:
struct CRGB { unsigned char b; unsigned char r; unsigned char g; }” but that didn’t worked for me…

So the main problem was my lack of knowledge and the not really existing documentation :smiley: (perhaps you should look for someone who can help you with that and take some work off you)

That would’ve been for version 1 of FastSPI. Does not work in version 2.