Blinking LED with Sequence

Welcome to the forums. Kuddos for using code tags!

So, you have your fading sequence (copied from somewhere, I am guessing) and now you want to add another LED and blink it the number of times through loop, but only up to 5?

The easiest method would be to have a new, global variable that you increment each time loop() begins and, if it is greater than 5, reset it to 5. Then blink that many times (or all WHITE if at 5) and then continue on with your sequence as defined.

The better method (but more advanced) would be to study the Blink Without Delay example in the IDE (File->examples->02.digital->Blink Without Delay) and this tutorial: several things at the same time
and refactor your code to eliminate all those for() loops and delay() statements and let loop() do what it was born to do. :slight_smile: