Hello, I'm trying to crossfade between 2 colors with FastLED and some neopixel.

Hello,
I’m trying to crossfade between 2 colors with FastLED and some neopixel.
For now my solutions consists of a long ‘for’ loop that blocks the execution of some other code, do you have some examples of crossfading that is non-blocking?

Here is my code for now: https://gist.github.com/xseignard/6ab28d169d8ae18e2a23

Best regards

One of many possible solutions: https://plus.google.com/115124694226931502095/posts/RU6EThM5NCm

You could try defining the hue as a changing variable with beatsin8.
Ex.
uint8_t hue = beatsin8(10,65,110);
fill_solid(leds, NUM_LEDS, CHSV(hue,255,255));
FastLED.show();

That would cycle between yellow (65) and green (110).

Those are great solutions, and I can’t wait to get some time when I get back home to play around a bit with Stefan’s.

Thanks for the help!