Hello, could you tell me how i make crossfades effects?

Hello, could you tell me how i make crossfades effects? For Example Fade slowly all leds from red to another color…
Now I use
fill_solid( leds, NUM_LEDS, CRGB( Value, Value, Value)
and change with iteration the “value”… I searched hours but found nothing?!
But in the announcement it says new function for crossfades…
By the way very good library :slight_smile:
Many thanks for help!!

For a beginner, I’d recommend something like:

for (int i=0; i<255; i++) {
fill_solid(leds, NUM_LEDS, CHSV(i, 255,255));
FastLED.show();
delay(10);
}

The crossfades is something totally different and a much more advanced functionality.

Thanks for your reply. Okay thats the Code that i use actually :slight_smile:

If you want to see what others have done, here’s a page from a Wiki I’m (slowly) working on:

Get FastLED & examples here:

Mark’s additional demos:
https://gist.github.com/kriegsman

Other notable gists and pastebins:
https://gist.github.com/kriegsman
https://gist.github.com/hsiboy
https://gist.github.com/jpro56
https://gist.github.com/jasoncoon
https://gist.github.com/StefanPetrick

Other Git Repositories

There’s a LOT of stuff there.

Thanks for the wonderful resources!

Thank you very much! Very nice! Thanks to the programmer of cource too!

What I did is something like rendering 2 CRGB arrays with different contents - lets call them leds2 and leds3.

For a crossfade I scale down the brightness of both and the sum is the result.

leds2[i].nscale8(x);
leds3[i].nscale8(255-x);
leds[i]=leds2[i]+leds3[i];

For x = 0 you see only leds3, with x=255 you see only leds2, with x = 127 you see both blended.

Here I crossfade constantly between 2 completely independet animations: https://www.youtube.com/watch?v=eXC5PCXHPNo While one animation is unvisible it gets a new random parameter set.

That’s a pretty neat trick @Stefan_Petrick ​!