Go Down

Topic: Help me about freezing the fastled color palette effects (Read 106 times) previous topic - next topic

kaitoukid93

Hi all
My arduino has been running color palette effect for months, so far so good
Sometime the color just so perfect and I want to stop the effect right at that moment and keep the led that way by pushing a button, and then if I want them to continue running, I push the button again (or another button)
can anyone help me?
thanks

larryd

The way the library is written, it is impossible to immediately freeze things on a switch press.

If you rewrite the library, you could add code to monitor the switch and then achieve what you want.

But, always show us your 'current' complete sketch.
Use CTRL T to format the sketch.
Please use code tags.
Use the </> icon in the posting menu.   
[code] Paste sketch here. [/code]



.
No technical PMs.
The last thing you did is where you should start looking.

Grumpy_Mike

You need to write the code as a state machine. No need to change the libiary.

This means removing any delays and rewriting for loops that contain them into functions that only do one iteration of a loop before returning.

Go Up