-->
Page 4 of 5

Re: Power usage

PostPosted: Mon Aug 03, 2015 5:17 am
by tytower
Yes it was running on batteries but chewed them so now on a separate wart supply.Only noticed this in the dark . There is not a lot of light coming from it when it does it . Anyhow just thought I'd ask. Thanks

Re: Power usage

PostPosted: Mon Aug 03, 2015 12:36 pm
by LauBaz
Is there any way to use the deepsleep for longer than 35 minutes? (That is the maximum time in microseconds for an int I believe)

Re: Power usage

PostPosted: Mon Aug 03, 2015 6:16 pm
by Stoney
LauBaz wrote:Is there any way to use the deepsleep for longer than 35 minutes? (That is the maximum time in microseconds for an int I believe)


not tried this long but 2^32 / 1000000 = 4295 seconds or 1 hour 11 minutes.
should be doable ?
apart fron that if you want to wake using external pulse you can use 0.
then it will never wake.

Re: Power usage

PostPosted: Tue Aug 04, 2015 9:29 am
by LauBaz
Stoney wrote:
not tried this long but 2^32 / 1000000 = 4295 seconds or 1 hour 11 minutes.
should be doable ?


Thank you for that answer. After checking a bit, I am puzzled:

ESP.deepSleep(60*60*1000000); //Compiler error: "warning: integer overflow in expression [-Woverflow]"
ESP.deepSleep(3600000000); //no error, this seems to work (although I have not waited an hour to wait for it). I have even tried it all the way to 4294967295 (2^32 -1) and it compiles fine.

What am I missing there?