Waking esp8266 via Pin (wemos D1)

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
andrey-git
Posts: 1
Joined: Tue Jun 27, 2017 8:02 pm

Waking esp8266 via Pin (wemos D1)

Post by andrey-git » Tue Jun 27, 2017 8:19 pm

According to the documentation here: http://docs.micropython.org/en/v1.9/esp ... .deepsleep

Pin change can be used to wake the board from deepsleep.

I tried the following:

from machine import Pin
p5 = Pin(5, Pin.IN)
p5.irq(trigger=Pin.IRQ_RISING|Pin.IRQ_FALLING)

If I change the voltage on pin5 while the board is awake - the IRQ fires fine.
However if I run machine.deepsleep() it won't wake up when changing voltage on pin5

Is this feature supported?

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Waking esp8266 via Pin (wemos D1)

Post by kfricke » Wed Jun 28, 2017 7:08 am

Yes it is supported. You must use the RST (reset) pin for this. When using RTC based wakeboard it is connected to the GPIO pin 16, which yields the reset from the internal RTC.
Check the datasheet for details and how to addept this should be straight forward.

Post Reply