Spent a few evenings working on some fast led code and its coming out really well for what i want to do, I started combining a few animations with a push button to change between them. I also have a function that flashes the leds white for 500ms when an IR receiver is tripped. All the animations seam to function and so does the IRflash. What has got me stumped is when i push the button there is a momentary pause .5 - 1 sec long between animations. I am running this on an Arduino mega. The button code is based on AllEffects_FastLED and works without a delay in that program.
I have tried many things but nothing seems to effect the delay.
Any thoughts advice or direction on this issue is greatly appreciated.
You have a FastLED.delay(500) in your IRflash function. The program won’t continue while that delay is happening, therefore your switch case won’t run until the IRflash function finishes.
@marmil i tried that again just now, // out the delay in IRflash and it still has a delay in-between changing patterns. When i push the button the current animation freezes before playing the next one a second later.
@marmil it does it between all the patterns. I tried it with all and excluding some… prob didn’t try it with all combinations. And not sure what that line does. Borrowed that from some other code. But it compiles fine for me.
@Andrew_Tuline thanks I’ll give that a try tonight. That was me playing around and not sure if it’s really nessesary. All the animations came from their own individual sketches