Newbie just tsrating, need help with a sketch

At power up, previousMillis is initialized to 0 by the compiler if it is not given an explicit value.
Also note millis( ) returns 0 at power up.

if (doBlink == false && currentMillis - previousMillis >= 5000)
So at power up we would have:
if(doBlink == false && 0 - 0 >= 5000)
Obviously this would not be so.


If you scoot down to the 30 second timer you see:


    //enable the 5 second TIMER
    doBlink = false;

    //restart the 5 second TIMER
    previousMillis = millis();

What is being done is the 5 second TIMER is enabled once again and we make previousMillis the same value that millis( ) returns

Making previousMillis = millis( ) basically resets the 5 second TIMER