Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
ESP8266.deepSleep(micros, option) to discuss #1102
@gfwilliams please add ESP8266 and enhancement label.
Asking for a possible way to control power consumption on wakeup by adding a second parameter to ESP8266.deepSleep().
Any comment, suggestion or advise?
Put the ESP8266 into 'deep sleep' for the given number of microseconds, reducing power consumption drastically.
meaning of option values:
0 - the 108th Byte of init parameter decides whether RF calibration will be performed or not.
1 - run RF calibration after waking up. Power consumption is high.
2 - no RF calibration after waking up. Power consumption is low.
4 - no RF after waking up. Power consumption is the lowest.
Note: unlike normal Espruino boards' 'deep sleep' mode, ESP8266 deep sleep actually turns off the processor. After the given number of microseconds have elapsed, the ESP8266 will restart as if power had been turned off and then back on. All contents of RAM will be lost.
Special: 0 microseconds cause sleep forever until external wakeup RST pull down occurs.
micros - Number of microseconds to sleep.
option - possible values are 0, 1, 2 or 4
@MaBecker thanks for the reply!!