I have another question that i cant figure out.

I have another question that i cant figure out. In this code, I have a red dot that travels up a strip of leds and then “explodes” into random shimmers. The problem is that the code runs through the first part but only lets one led shimmer fire off before it loops. What would be the best way to force the code to stay in the shimmer portion for a specified amount of time/amount of leds.

http://pastebin.com/DH7NrqZ9

In the 2nd part of that Shimmer() function…

you set only one random LED of the btail to white and immediately turn it black.

That is likely much too fast to make it visible so even a small delay after the 1st show may be useful but the main problem is that this only happens once!!

You could…

  1. Set that whole 2nd part inside a for loop and repeat it say 20, 50, 100 times or whatever you want…

  2. Set that whole 2nd part inside a timed loop and continuously go through the loop until that timer expires. This can be as short or as long as you want. Just look into the arduino millis() function and the numerous examples of how to use it.

Ok Thanks. Thats what i was originally thinking but wanted to get someone elses opinion

Hi @Johnny_Woods_Masamun , then you should have just done it without worrying about getting someone else’s opinion…

You have an idea on how to do something, even just a vague one… just do it until it works or you get really stuck!!