Code: Select all
MicroPython v1.9.4 on 2018-05-11; ESP32 module with ESP32
Type "help()" for more information.
>>> from machine import Pin
>>> p=Pin(12, Pin.IN, Pin.PULL_UP)
>>>
>>> import esp32
>>> esp32.wake_on_ext1((p,), esp32.WAKEUP_ALL_LOW)
>>> import machine
>>> machine.deepsleep()