Open Emetz564 opened 8 years ago
//avoid millis overflow problem if( millis() < previous ) previous = millis();
There is NO millis overflow problem. The variable previous is unsigned long, so even if Millis() overflows, code still works correctly. This line is scattered all over, and since unnecessary, a complete waste of precious space.
See - http://www.gammon.com.au/millis or http://playground.arduino.cc/Code/TimingRollover or many other pages dispelling this myth
There is NO millis overflow problem. The variable previous is unsigned long, so even if Millis() overflows, code still works correctly. This line is scattered all over, and since unnecessary, a complete waste of precious space.
See - http://www.gammon.com.au/millis or http://playground.arduino.cc/Code/TimingRollover or many other pages dispelling this myth