Led sequence without delay

mart256:
main loop wastes a lot of computing.

Its not possible to have the Arduino do nothing. It might as well waste its time in loop() as anywhere else.

I wrote a demo sketch in this Thread that illustrates the use of the techniques of Blink Without Delay and State variables in a more extensive example.

There is also a very extensive thread about led sequences here.

...R