This program is written in C++ for Arduino.  I put all declarations and library functions at the beginning, then Setup, then Loop, the latter containing the list of functions (known as subroutines in other languages).   I moved the functions around to change the sequence of the displayed lights.  After main Loop are all the individual functions.

I tried to follow good practices but it is my first C++ code, so there may be room for improvement.

 
 
Select to download or view the program (*.ino for Arduino).
 
Star Program