I am using millis() to count off some things by storing it to a float variable. I am able to re-boot the board every 30 days. Will this work? I am not sure from all I read.

In other words the float variable stores the value of millis() after a certain sensor is triggered. After 30 days the whole board is rebooted.

i am trying to keep track of when a sensor is triggered and compare it to its prior triggering: the prior time may be moments or weeks ago. So comparing the millis() now to the last time is my goal.

SamBrownADK:
i am trying to keep track of when a sensor is triggered and compare it to its prior triggering: the prior time may be moments or weeks ago. So comparing the millis() now to the last time is my goal.

Another problem is that the usual trick of using subtraction on 'unsigned long' variables to get around the rollover characteristic won't work with floats.

I am using float 'cause I thought it would be a variable capable of a big number. No other particular reason. If it is not the best choice then from what I read here, unsigned long will be superior. i am not sure why yet (I have to read more about the two).

SamBrownADK:
i am trying to keep track of when a sensor is triggered and compare it to its prior triggering: the prior time may be moments or weeks ago.

If you use seconds instead of milliseconds the math is the same and the window is expanded to...

(2^32)/86000/365.2425 = ~136 years

Is seconds a reasonable granularity?

Will anyone care if the delta is greater than 136 years?