Thanks Bulldog!!! you make it look ez.
Now I need to learn what it all does, and I will.
moderator: please split this thread
it is easy if you think about millis() as a timestamp:
assign the current time to startTime:
startTime = millis();
how much time has elapsed?
millis() - startTime = elapsedTime;
has my timer expired?
if millis()- startTime > interval;
then start the timer all over by adding the interval to the startTime:
else startTime += interval;
above is equivalent to :
else startTime = startTime + interval;