ESP32: RTC no function 'wake_on_ext0'
Hello,
this question may already be answered, but I can't find any working version for me.
I'm trying to use an interrupt-Pin on my newly flashed ESP32.
I tried with multiple snippets I found online (e.g. this or this), but it always breaks down to the point that RTC doesn't have the attribute now() or wake_on_ext0.
AttributeError: 'RTC' object has no attribute 'wake_on_ext0'
Is there anything I'm doing wrong? I'm using a flashed ESP32 wroom and the latest binaries from here (esp32-20180915-v1.9.4-528-gabb536da4.bin).
Thanks for your help!
S2/S3 RTC_VALID_EXT_PINS definitions
Coming around back to this one https://github.com/micropython/micropython/issues/7607
On S2/S3 variants, GPIO0 through GPIO21 are valid RTC pins. In this example, asserting pin 5 should wake.
import esp32
import machine
from machine import Pin
o = Pin(5, Pin.IN, pull=Pin.PULL_DOWN)
esp32.wake_on_ext1(pins = (o,), level = esp32.WAKEUP_ANY_HIGH) #multi-pin
machine.deepsleep(10000)
I have a local fix, working on a pull request...