ESP_SLEEP_WAKEUP_EXT0 with two or more GPIOs (PINs)

kevinx
Posts: 5
Joined: Fri Jul 09, 2021 3:10 am

ESP_SLEEP_WAKEUP_EXT0 with two or more GPIOs (PINs)

Postby kevinx » Fri Jul 09, 2021 3:28 am

Hello, Thank you first for the support you can give me. I need help developing a code with ESP32 that allows me to use two or more pins with the ESP_SLEEP_WAKEUP_EXT0 function, so far it works fine with one, but when trying to do it with another it no longer works. The initial code is attached that works with the GPIO2, if I do change it by GPIO4 also works, but not together. Sorry if something it's wrong, it's my first topic in this forum.
ESP_SLEEP_WAKEUP_EXT0 function.txt
(902 Bytes) Downloaded 272 times

ESP_Sprite
Posts: 9749
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP_SLEEP_WAKEUP_EXT0 with two or more GPIOs (PINs)

Postby ESP_Sprite » Fri Jul 09, 2021 3:53 am

Ext0 only supports 1 GPIO. You want ext1 wakeup for multiple.

kevinx
Posts: 5
Joined: Fri Jul 09, 2021 3:10 am

Re: ESP_SLEEP_WAKEUP_EXT0 with two or more GPIOs (PINs)

Postby kevinx » Fri Jul 09, 2021 8:28 pm

Hello ESP_Sprite and thanks for your prompt answer. I also thought of the EXT1, but the problem is that I need to work with static switches, and they can be in Low or High State each one, for a long time ie: Can be one minute, one hour, or until one month in the same position (low or HigH), and this EXT1 it's good to work for pulsed switches. My need to use deepsleep is to minimize consumption. Can you tell me what I can do or recommend what change would be good for this need? If you want, I can explain well how what I need works and if you help me solve it.

Thank you so much for your help.

ESP_Sprite
Posts: 9749
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP_SLEEP_WAKEUP_EXT0 with two or more GPIOs (PINs)

Postby ESP_Sprite » Sat Jul 10, 2021 1:26 am

Not sure... you could possibly write a small ULP program to handle this?

Who is online

Users browsing this forum: Baidu [Spider], Majestic-12 [Bot] and 95 guests