DeepSleep and ESP8266 Issue

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
lazarvgd
Posts: 39
Joined: Sun May 20, 2018 8:57 am

DeepSleep and ESP8266 Issue

Post by lazarvgd » Fri Mar 05, 2021 9:09 am

Hello, I am trying to use deep sleep on Wemos esp8266(at least the board looks like a wemos board).

I set conditions for deep sleep, but I do not understand why board doesn't proceed with work after it is woke up?
I used this code snippet to put board to sleep

Code: Select all

def deep_sleep(msecs):
  #configure RTC.ALARM0 to be able to wake the device
  rtc = machine.RTC()
  rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP)
  # set RTC.ALARM0 to fire after Xmilliseconds, waking the device
  rtc.alarm(rtc.ALARM0, msecs)
  #put the device to sleep
  machine.deepsleep()
Can you tell me what am I missing about this? Why my code does not execute anymore?
Thanks :)

pumv
Posts: 1
Joined: Sun Mar 07, 2021 1:14 pm

Re: DeepSleep and ESP8266 Issue

Post by pumv » Sun Mar 07, 2021 1:18 pm

Have you connected RST and D0?

Image

Post Reply