Resetting Millis()

if you just do it with numbers, no, because a number literal is treated as a signed int. Make them unsigned variables and it will.

Small test:

unsigned long myUnsigned = 0;

void setup(){
  Serial.begin(115200);
}

void loop(){
  Serial.println(myUnsigned);
  myUnsigned--;
  delay(500);
}

stevelondon2:
I have an RTC clock on the system which will trigger each pumpkin section, I just wanted to use the millis in case the RTC fails. It doesn't matter if it fails and the pump doesn't come on, its if it fails when it is on and won't turn off.

You want to use millis() as a backup time source? Then you should use the Time library, use the library functions to get time, and set the RTC as a sync time provider.

Ahh, missed that second post. Then simply turning it on with the RTC an timing it / turning it off with millis() will solve it :slight_smile: You're not going to notice 1% off over the span of 1 minute :slight_smile: