Simple button deep sleep on/off functionality

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Simple button deep sleep on/off functionality

Postby Deouss » Wed Dec 05, 2018 6:42 pm

Let's say we want to put ESP32 to sleep and after some time wake it up with simple button press.
Button press - sleep - one more press - wake up
What do you think would be the easiest and elegant way to do it?

Thanks

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

Re: Simple button deep sleep on/off functionality

Postby ESP_Sprite » Thu Dec 06, 2018 2:09 am

Write your program to watch the button GPIO. If it detects it's pressed, go into deep sleep and configure that GPIO as a wakeup source.

Who is online

Users browsing this forum: Bing [Bot] and 153 guests