The following program statement can be re-stated in the plain words following the program statement:
if ( (millis () - greenLEDtimer) >= greenLEDinterval)
That is to say: If the time at this instant, subtracted from the start time, is greater than or equals the required time, then the event (light LED) is complete.
Is this correct? The syllogism is elementary, the difficulty is reading the symbolic statement as a syllogism. Please discuss and critique.
The subtlety with this code is that it is speficially not coded as:
if (millis () >= greenLEDtimer + greenLEDinterval)
Because that will not work around millis() wrap-arounds.
The other subtlety is that it is going to toggle an awful lot once the condition is true
because its likely called every time round loop(), the probably intention was to cancel
the timer at this point, which takes another boolean variable perhaps, or a reseting of the greenLEDtimer value