How to wake Pi Pico / Pico W / Pico 2 from sleep using GPIO button? #16166
Unanswered
RYoder97
asked this question in
Hardware & Peripherals
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A lot of people use sleep modes for finite amount of times, waking up after X seconds.
I would like to indefinitely make the microcontroller go to sleep until any of 4 GPIO buttons is pressed.
I can't seem to find a rudimentary example of this. I found some stuff related to other microcontroller boards (ESP32), but the code did not work for the Pico.
Do I use Pin.irq? What arguments should I be using?
Is the code different depending on the sleep state? Light vs deep? What are the differences?
Beta Was this translation helpful? Give feedback.
All reactions