I am running 6 LEDs all working correctly I just can't get the sequence I want down. I'm trying to make the initial start up sequence LEDs 2+3, 1+4, then 0+5 so if they are on line they would start from the inside out. I only want the start up sequence in the when it starts up then to pause for 250 milliseconds then all 6 LEDs turn on and stay on at once. The issue I'm having is after it "starts up", it waits the 250 milliseconds then all 6 turn on then they start going into a loop where they will all turn on and off. I just want them to stay lit. What is wrong with the code? Thanks.
STARTUP is called, and each pair of LEDs is turned on, with a pause in between. Then, all are turned off after a pause. They are immediately turned back on because STARTUP ends and RUNNING is called.
RUNNING ends, with the LEDS all on, and you turn pairs (that are on) on again. Then, turn all LEDs off, and start the process again.
I just want them to stay lit. What is wrong with the code?
The fact that you call STARTUP again, in loop().
Move STARTUP() to setup().
Though why you want to turn the pins on over an over again is mystery.
There is a convention that all capital letter names are reserved for #define'd or const variables. Can you think of a single Arduino or C function that is all upper case?
I've migrated the "Startup" to "Setup". They all stay lit, although there is no "Startup" sequence on the LEDs. It waits a few seconds, then all 6 LEDs come on at once. Thanks for the capitalization tip.
OP had a for loop, but was setting the pins to OUTPUT in that loop, AFTER call the Startup() function. The call to Startup() needed to be moved after the for loop to define the mode of the pins.