Hello! I am building a React Native app that controls ESP8266 via WebSockets and

Hello! I am building a React Native app that controls ESP8266 via WebSockets and one of the features of the app is that you can create a gradient of colors, upload it to the ESP chip and make the gradient shift along the strip.

So I have a gradient crossfade strategy question. Using FastLED library, what would be the way to set a strip of lights as a gradient, and then shift this gradient back and forth along the strip?

I know I can use fill_gradient function to set the strip to a gradient, but how can I then make this gradient move along the strip?

Thanks for your time!

I filled an array using the fill_gradient function, the set my led array equal to it, and every so often shifted the values in the gradient array

To produce smooth results, the gradient array needs to be a multiple of the led array

Tried this yesterday, worked pretty well, thanks!

One thing I noticed was that it is hard to make the speed of the shifting easily adjustable.

I will try another method today, creating a color palette from the gradient via blend function and then using ColorFromPalette to fill the LEDs from this gradient palette and shift the index there.

Usibg timer should have been easy to adjust the time Eg

if(shifttime > millis()){
Shifttime = millis() + shiftSpeed;
Shiftthoseleds();
}

Then just adjust shiftSpeed… Could do it with a pot…