Help with delay/millis without influencing the framerate

You might also want to have a look at Inaccurate time intervals for a Metronome

The code looks good apart from the auto restart with startT = millis() - this will accumulate errors, although may be what you want - fixed rate or fixed delay?

2 Likes