New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP8266.deepSleep(micros, option) to discuss #1102
Comments
|
Great, so I will create a PR in the next days |
|
@MaBecker this would be excellent!! I have been trying to get deepsleep of any kind working on esp8266... It keeps locking or needing a forced reset. Looking forward to your work! |
|
Hi @TrevorJTClarke, did you connect gpio16 to rest? I guess it is not part of of the reference, will plan to add this. |
|
Made a decision: I will add "bool system_deep_sleep_set_option(uint8 option)" as additional function |
|
@MaBecker thanks for the reply!! |
Yes |
|
@MaBecker working now! Appreciate the help! |
@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?
Call type:
ESP8266.deepSleep(micros, option)
Description
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.
Parameters
micros - Number of microseconds to sleep.
option - possible values are 0, 1, 2 or 4
The text was updated successfully, but these errors were encountered: