Hey, so I've got a project and I'm looking into using FastLED.

Hey, so I’ve got a project and I’m looking into using FastLED. I have a mixture of both neopixels, single color, and regular rgb strips. The neopixels will be controlled directly by the arduino but the other LEDs will be handled by the TLC59711 PWM driver. Is that driver board compatible with FastLED?

No, I don’t support any of the TLC drivers yet.

Hmmm okay. Would there be a way to write the rgb values from fastled to memory and then read those and send them through the tlc library?

They are already in memory if you have an array of CRGB objects, they are just three byte values for red, blue, and green. Or you could just do a loop, if the TLC library is like the adafruit library with explicit setPixel methods instead of array accesses:

tlc.setPixel(0, leds[somePixel].r, leds[somePixel].g,leds[somePixel].b);

Ah perfect. It works exactly like that. Will doing things that way take into account color correction or temporal dithering? Or does that stuff take after the crgb objects?

No, the color correction/dithering is part of the led drivers themselves at the moment. I will eventually publish an api that people can use to access that stuff directly, but it isn’t remotely usable/ready yet and what’s in there now is about to get torn apart and re-done.

Got it. Well thanks for the responsive help!

I’ve got another question. I’m trying to create a function that returns a CRGB array. Something like this:

CRGB functionName(int a, int b, int c) {
CRGB leds[NUM_LEDS];
// Some stuff
return leds;
}

But this doesn’t work. I’m assuming it has to do with telling the function to return an array. I couldn’t find any examples that show something like this, what is the correct usage?

I could have the function modify a temporary array and then assign it to the one I want, but returning an array directly seems more robust.