1

I have made an irrigation system using Arduino. Timer program is based on comparing the previous Millis() and current Millis(). I want to know the chance for error when the currentMillis() overflows and start from zero after 50 days, while the previous Millis() stored in the variable remains as a larger value.

  • What do you mean with "chance of error"? If you do it like in the `BlinkWithoutDelay` example the overflow is no problem as long as the time difference between the previous `millis()` value and the current one stays below the ~50 days, since `millis()` just cannot count longer. – chrisl Oct 13 '21 at 16:05
  • 2
    See [How can I handle the millis() rollover?](https://arduino.stackexchange.com/questions/12587). – Edgar Bonet Oct 13 '21 at 16:27
  • arduino timekeeping is not accurate if you do not use an RTC module .... it is ok for timing intervals, such as watering every 12 hours ... but it is unable to water at a specific time – jsotola Oct 13 '21 at 22:38
  • this may be useful ... https://github.com/OpenSprinkler – jsotola Oct 13 '21 at 22:40

0 Answers0