Finally found some time to get back to playing with LEDs. I want to write a basic sketch to fade an entire strip (every pixel at once… not first pixel to last pixel) from orange to green and back again – for some simple Halloween lighting.
I thought FastLED had a function for fading one color to another (entire strip, not from pixel A to pixel B) but can’t find it.
If it doesn’t exist, I’ll math something… but don’t want to find out later something existed.
Welcome back from 3d printer land @allanGEE . If the whole strip is going to be the same color then the simple fill_solid or a simple for loop can be used. The part of the project that has MANY more options is where the color choice comes from and what drives the change over time.
The color choice could come from a color palette, gradient color palette, fill_gradient, the blend function, and probably others I’m not thinking of. And the fading up/down/back and forth/blending could be based on a trig (wave) function, a beat function, a counter, etc.
Thanks @marmil . I’ve been messing with some functions on a notepad during coffee breaks, and will try some stuff soon!
I really need to study up on – and play with – palettes. It’s one of those things I know will take up some time to learn, but then save a LOT of time later when I can implement them.
And I’m still in 3D printer land… but impending Christmas has me re-attempting an outdoor light installation. (Halloween would make a nice test run, before the freezing temps kick in).
Came up with some code to accomplish the above. Wife decided purple was nicer than orange (so simple to change with CHSV!) – and I decided to have a quick fade up and a slow fade down. Now to see if I can get some lights on the house. Chance of snow flurries today… and an inch of snow on Thursday!
I need to clean up the code and comment it heavily (so I remember what I did NEXT year)… then I’ll GIT it and post a link.