millis() rollover

timer roll-over can be simple… don’t use the timer itself. Use a function that reads the timer and computes the distance in ticks from a tick count passed to the function, and the current timer, accounting for the modulo roll-over. It’s just a couple lines of code using unsigned types.