Unlike the deep sleep, where most of the working code is in the Setup() section, for Light Sleep, the code will be in the Loop() section, the Setup() section will be used as per normal to initialise the serial connection and initialisation of GPIO pins. Method ONE wakes up the device on a regular intervall, wait for TELEPERIOD and immediate go to deepsleep again. I hope this will be useful for people trying to implement the Light Sleep Mode. There are TWO general methods to work with deepsleep. This is also called Forced Light Sleep.Īfter pulling my hair for several days trying to get the Light Sleep Mode to work, I finally figured out how to do this. The concept is to let ESP8266 to Light Sleep indefinitely, only to be waken up when there is a level changes (HIGH to LOW) or (LOW to HIGH) on one of the GPIO pin. Several codes that I have find causes my ESP8266 to crash miserably. At present I am only getting 5 days battery life. This is publishing sensor readings every 10 seconds and going to deep sleep. anything over that time produces this error: srcTimeSetup.cpp: In function ‘void RunTime ()’: srcTimeSetup.cpp:5:28: warning: integer overflow in expression. 18650 2200mAh battery connected to battery shield. Timer-based wake-up Determining the reason for waking Time-keeping during/across sleep Sources & links Code continuation after wake-up The Wi-Fi modem is turned off in all sleep modes, so it is necessary to restart/reconnect the WiFi when waking up from any sleep mode. I’m using a ESP8266 standard development port and trying to increase the time limit on deep sleep as I cannot seem to go above 36 minutes. ![]() ![]() So I embark on the journey to find out how to make use of the Light Sleep Mode. Wemos D1 mini (ESP8266) Wemos battery shield. ESP8266 Deep Sleep (Arduino IDE) ESP8266 Deep Sleep and Wake Up Sources (MicroPython) Thanks for reading. ![]() The concept idea is to have the MCU in deep sleep. How to Enable ESP8266 Deep Sleep Mode Timer Wake-up. This is the continuation from the previous blog about ESP8266 Deep Sleep Mode, I am trying to use the other sleep mode. Long story short, I am building an ESP8266 based mailbox sensor, loosely following the post found here.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |