Page 1 of 2
Timer
Posted:
Sun Dec 06, 2015 8:25 pm
by viscomjim
What is the limitation of the timer, ie what is the max number you can put in the timer function? I want to set the esp up to email something once every 6 or 12 hours. Should i use the timer function or read the time and parse it to check for a certain interval lapse?
Thanks for your help!!!
Re: Timer
Posted:
Sun Dec 06, 2015 9:13 pm
by Mmiscool
I don't know of any specific limit for the timer function right now. It should be able to handle hours long wait.
Re: Timer
Posted:
Sun Dec 06, 2015 9:33 pm
by forlotto
Even if there were a limit you could setup routines to get around it just using one timer routine and then going to a sub that produces another or at least I would think it would be possible at least... While not 100%
I think its a good question though 60000 for every minute 3600000 for every hour I believe it is... so add another 0 and thats 10 hours puts you roughly where you want to be...
Anyhow when you test this out post your results it would be good info to share with the community.
Re: Timer
Posted:
Sun Dec 06, 2015 10:38 pm
by heckler
viscomjim,
you could also take advantage of the NTP time function "time()" to get the time periodically to determine when to send the email.
I guess the down side of that is how often do you want to check NTP time and how accurately do you need the emails sent.
If you check NTP time every 15 minutes then that will be the degree of accuracy as to when you have passed the next time mark.
dwight