So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By hackerjoe
#85363
btidey wrote:Try changing the type for sleepTimesS to an unsigned long instead of an int.

Hello there and thank you for your reply,
*** I tried editting the code in these 2 places but it didn't work :(

const int sleepTimeS = 3.6e+9
ESP.deepSleep(sleepTimeS, WAKE_RF_DEFAULT); // Sleep for 60 seconds

*** This edit on the 2 lines works for close to an hour

const int sleepTimeS = 3600;
ESP.deepSleep(sleepTimeS * 1000000ul, WAKE_RF_DEFAULT); // Sleep for 60 seconds

*** I think by adding the ul above causes the number to go positive from what I have found on google.
I googled for the difference between const int and unsigned int and from what I can make out ( NOT A PROGRAMMER ) const int can go either positive or negative but unsigned would always be positive is that correct in saying?
So I kind of understand why what your saying should work...