Sure it is, but i have not seen that many boards with nearly down to no power draining components. The Wemos Mini might be different and at least hours of sleep time can negate the time of high power usage when the MCU us acitve and using WIFI.pythoncoder wrote:kfricke wrote:This Espressif link claims 10μA. Is this not achievable?
Library to deep sleep for days for esp8366
Re: Library to deep sleep for days for esp8266
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Library to deep sleep for days for esp8366
Fair point. This rules out any board with a USB interface. The Adafruit Huzzah looks promising, though https://learn.adafruit.com/adafruit-huz ... /downloads. Assuming the pins with resistors go hi-z on sleep there's not much there to use power. The regulator takes 80μA max (55μA typical) which (based on max) gives ~800mA/H for a year's operation - plus whatever is required to actually do something useful
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Library to deep sleep for days for esp8366
Does anyone know if long sleeping times are a problem even if you are not setting rtc.alarm?
So e.g. if you run this code to put the ESP8266 to deepsleep mode, will it wakeup automatically after some time (e.g. 71 min) without connecting RST to GND/Pin16?
So e.g. if you run this code to put the ESP8266 to deepsleep mode, will it wakeup automatically after some time (e.g. 71 min) without connecting RST to GND/Pin16?
Code: Select all
import machine
rtc = machine.RTC()
rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP)
### rtc.alarm(rtc.ALARM0, 10000) ! don't do this, only hard wakeups allowed
Re: Library to deep sleep for days for esp8366
I know the library is a bit old, but it seems line 53 of hourlysleeper.py:
doesn't do anything. The ESP resets without going to deep sleep. I'm not sure why.
I had to replace it with the rtc.ALARM approach to get the long hours sleep working.
Code: Select all
esp.deepsleep(1000000 * duration)
I had to replace it with the rtc.ALARM approach to get the long hours sleep working.