[Solved] turn on/off 6 LEDs in succession using millis()

I want to use millis( ) so that 1. turn on LED1 for 1 second then turn it off 2. turn on LED2 for 1 second then turn it off ... 6. turn on LED6 for 1 second then turn if off

then loop back to 1.

I have looked at the BlinkWithoutDelay example and also https://www.baldengineer.com/millis-tutorial.html The latter has the 2nd LED independent of the 1st LED.

But LED2 can only turn on for 1 second after LED1 has turned on for 1 second then turned off.

I am having a difficult time with this.

:slightly_frowning_face:

How about blink without delay, an array of LED output pins, and an index that advances every two seconds? (or every second. Whatever)

Now that we know what you want, show use what you have done.

Always show us your ‘current’ compete sketch.
Use CTRL T to format the sketch.
Please use code tags.
Use the </> icon in the posting menu.

[code] Paste sketch here. [/code]

There are a number of examples for that. Search for a combination with: arduino, knight rider, chasing leds, millis. For example this one uses millis() an array and a changing index (as GrooveFlotilla mentioned): https://gist.github.com/choas/1529448. When the leds are only going in one direction, the code is even shorter than that.

GrooveFlotilla: How about blink without delay, an array of LED output pins, and an index that advances every two seconds? (or every second. Whatever)

Thanks!

Why didn't I think of that? SIGH.

I will work on this over the weekend.

Koepel: There are a number of examples for that. Search for a combination with: arduino, knight rider, chasing leds, millis. For example this one uses millis() an array and a changing index (as GrooveFlotilla mentioned): https://gist.github.com/choas/1529448. When the leds are only going in one direction, the code is even shorter than that.

Ha ha ha. Knight Rider. That brings back TV memories from childhood.