I'm looking for a way to make a strip of 60 leds fade from one color to another then hold that new color for 10 seconds then fade to another color. I need it to change to about 15 to 20 colors.
It would be nice if for 3 of the colors half the strip was one color and the other half was another color.
Then end in a rainbow effect that ran for about 20 seconds.
Can anyone point me in the right direction for something like this?
I've used "fade in and out" function but it changes colors to quickly. Everytime I use the delay function it seems to jack everything up especially the rainbow seems to just slow the effect down.
Also is there a list of all the functions that can be used by fastled. I'm having issues trying to find all the cool features of fastled. I did find like 3 different ways of telling it what color I wanted.
What I really need is the function for color change and to make it keep the new color for a set amount of time. Also when I tell it to do the rainbow effect ti have it keep doing that for like 10 seconds.
I tried "delay" but I figured out real quick that all that does is slow down an animation.
Thanks in advance
Using the Adafruit neopixel thingy.
255,255,255 is white
250, 250, 250 is still white but the LEDs are dimmer.
200, 200, 200 is still white but the LEDS are dimmer.
150, 150, 150 is still white but the LEDS are dimmer.
You may be able to use something like that for the library you are using.
Also is there a list of all the functions that can be used by fastled.
The documentation is here:-
I've used "fade in and out" function but it changes colors to quickly
I don't understand then why you complain about delay just slowing things down?
Basically you have to change the three colours by a small increment on each display colour. This is just like drawing a diagonal line between two points on graph paper, the only thing is that you have three of these all going at the same rate, so the increment is different so that they all finish at the same time. To do this it is best to have the colour and increment as a floating point number and only change to an integer when it is time to output the current value.
Grumpy_Mike:
The documentation is here:-
Overview · FastLED/FastLED Wiki · GitHub
I don't understand then why you complain about delay just slowing things down?
it took me a bit to understand what the delay function does, I was looking more for a "pause" function or something. example, i want all 60 pixels to display red for 10 seconds, then fade to blue, display blue for 10 seconds, then fade to green, display green for 10 seconds.... so on and so on for like 15 different colors
it wasn't so much the delay function not working it was the "fade in and out" function never stopped and just held a color for bit.
I can find how to make color change from one to the next but the whole strip blink changing to the next color is a bit jarring visually speaking
i want all 60 pixels to display red for 10 seconds, then fade to blue, display blue for 10 seconds,
So when you have reached the destination colour you don't embark on the next change for another 10 seconds. So you put in an if statement that adds a delay when that point is reached. If you need to do other stuff during that time then you will have to write your fading code as a state machine, with the fading between each colour being a state.
See my
http://www.thebox.myzen.co.uk/Tutorial/State_Machine.html
Or Robin2's several things at once
http://forum.arduino.cc/index.php?topic=223286.0