Timing problem with millis

What is even worse, occasionally millis() increments by 2 instead of 1 (because the millis() interrupt occurs at 1.024mS intervals instead of exactly 1mS). This would eventually throw off the timing because the shorter delay would have a higher probability of hitting the increment by 2.

That would have been my suggestion.

1 Like