ESP32 Deep Sleep with buttons

Janas6323
Posts: 3
Joined: Thu May 16, 2024 5:17 pm

ESP32 Deep Sleep with buttons

Postby Janas6323 » Thu May 16, 2024 5:32 pm

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! :)

Janas6323
Posts: 3
Joined: Thu May 16, 2024 5:17 pm

Re: ESP32 Deep Sleep with buttons

Postby Janas6323 » Fri May 17, 2024 3:09 pm

Guys just give me an answer, is that even possible?

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

Re: ESP32 Deep Sleep with buttons

Postby ESP_Sprite » Sat May 18, 2024 1:19 am

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.

Janas6323
Posts: 3
Joined: Thu May 16, 2024 5:17 pm

Re: ESP32 Deep Sleep with buttons

Postby Janas6323 » Sun May 26, 2024 5:01 pm

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.

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

Re: ESP32 Deep Sleep with buttons

Postby ESP_Sprite » Mon May 27, 2024 1:02 am

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.

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot], prashant.anlg and 74 guests