Advice on awaken from sleep please

Code tips and tricks for beginners
Post Reply
Zim
Posts: 296
Joined: Mon Feb 08, 2021 9:15 pm
Has thanked: 277 times
Been thanked: 131 times

Advice on awaken from sleep please

Post by Zim »

Hi
I have two membrane switches connected to IO pins set as interrupts. They are used to run a menu. To increase battery life, the module sleeps after a few minutes. Is it possible to have module awaken if either button is pressed?

Thanks
Zim
User avatar
cicciocb
Site Admin
Posts: 2195
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: Advice on awaken from sleep please

Post by cicciocb »

No, only one pin is active.
However, you can use 2 diodes with a 3rd pin as wakeup
Zim
Posts: 296
Joined: Mon Feb 08, 2021 9:15 pm
Has thanked: 277 times
Been thanked: 131 times

Re: Advice on awaken from sleep please

Post by Zim »

Hey cicciocb! Great idea! I'll work with that!

thanks
Zim
Zim
Posts: 296
Joined: Mon Feb 08, 2021 9:15 pm
Has thanked: 277 times
Been thanked: 131 times

Re: Advice on awaken from sleep please

Post by Zim »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Wed Mar 13, 2024 5:52 pm No, only one pin is active.
However, you can use 2 diodes with a 3rd pin as wakeup
Hi cicciocb
is there documentation on how to set a pin active for wakeup?
thanks
Zim
User avatar
cicciocb
Site Admin
Posts: 2195
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: Advice on awaken from sleep please

Post by cicciocb »

You can find [Local Link Removed for Guests]

Code: [Local Link Removed for Guests]

' Sleeps for 3600 seconds (1 Hour) or until the pin 32 goes to high

SLEEP 3600, 32, 1
Post Reply