Random()

patduino:
Hi iluvplanes,

Just a few coding observations that can make your code easier to read and easier to understand:

You have 2 delays, 3 sec at the beginning of your loop and 1 sec at the bottom of the loop, that can be combined into a single delay.

// Comments help to explain what you are doing. I had to read through the code to determine the following:

It appears that you have a loop cycle time of 6.8 seconds when you add all of the delays. Within this time you would like to randomly flash some LEDs for 0.7 seconds.

From your code, it appears that you can flash an LED multiple times in the cycle--just not twice in a row, and that within a cycle it is ok if an LED doesn't flash at all. If not, then Nick's shuffle approach is the way to go.

That said... This was probably just supposed to be a fun activity and now that you've gotten it to work, you can move on to other things! FUN, FUN, FUN. If you're looking for something to tweak (and something to learn), maybe use potentiometers to vary the loop delay and on/off delays?

Patduino, thanks for the tips! What the code does is flash each LED once, making sure that each is flashed only once.