Page 1 of 1

ESP32 Deep Sleep with buttons

Posted: Thu May 16, 2024 5:32 pm
by Janas6323
Hi guys,

I'm a bit new to the ESP32 and I need help with the deep sleep function, triggered with 2 buttons.
Simply put - one button should only put the ESP32 into deep sleep, another button should only wake it up.

I'm using an ESP32-WROOM-32D. Not sure how relevant this is to solving my issue, but I'm using several ESP32 controllers with WLED in my car for ambient lights and some other external lights. I need some lights to light up when I unlock my car, and I can't find a way to power the board when unlocking, and keep it powered until I lock the car again. Therefore I'm looking for other solutions and I've heard deep sleep might be one of them, the only issue is setting it up properly.

Any help is appreciated! :)

Re: ESP32 Deep Sleep with buttons

Posted: Fri May 17, 2024 3:09 pm
by Janas6323
Guys just give me an answer, is that even possible?

Re: ESP32 Deep Sleep with buttons

Posted: Sat May 18, 2024 1:19 am
by ESP_Sprite
Yes, it's possible, it's actually fairly trivial as deep sleep things go. You're probably not getting an answer on the forum because you're not asking a question in your original post. If you tell us what you tried and where you're getting stuck, or if you ask an actual question, we can probably help you out better.

Re: ESP32 Deep Sleep with buttons

Posted: Sun May 26, 2024 5:01 pm
by Janas6323
The question is: can you provide me with the necessary code to make it work?
What I tried is: googled and searched everywhere, didn't find what I need.

I'm not a coder, never tinkered with ESP's, Arduinos, etc. What I need is help.

Re: ESP32 Deep Sleep with buttons

Posted: Mon May 27, 2024 1:02 am
by ESP_Sprite
I'm not gonna give you any code, because that means I'd have to write, test and debug it and I don't have the time or spoons to spare for that, but I can give you some pointers on how to proceed:

- In order to modify wled, you need to be able to compile it from source. Have you succeeded in doing that yet?
- Wled uses arduino and there are some good tutorials available for Arduino and deep sleep. You could see if you can get anywhere by mashing the code there and the wled sources together.