Chat freely about anything...

User avatar
By Sturgizz
#66770 Hello every body,

I have tested the deep sleep function ESP.deepsleep(time_us) with the Arduino IDE. I would like to know if the time set in parameter is the time when the esp wakes up. I tested on esp8266 developpement board and when I ask for 5 minuts with ESP.deepSleep(60000000, WAKE_RF_DEFAULT); I measure about 4 minuts and 55 seconds. Why it is not 5 minuts? Normal or not?
Thank's for yours explications

I use the simple code bellow

void setup() {
// put your setup code here, to run once:

}

void hibernate(int pInterval) {
ESP.deepSleep(60000000 * pInterval, WAKE_RF_DEFAULT);
delay(100);
}

void loop() {
// put your main code here, to run repeatedly:
hibernate(1);
}

Thank's a lot for your help
User avatar
By schufti
#66786 it is normal that times are not 100% on point. It can not be more accurate than the crystal on board, which is not of the best quality and has temperature drift, too.
If you need more accurate timing, you have to compensate in sw.