Can I somehow make the ESP32 enter deep sleep for a specified amount of time?
floitsch12/14/2022 04:14 PM
on v1 or v2?
DunjinnLord12/15/2022 08:59 AM
v1
floitsch12/15/2022 09:00 AM
The device goes to deep sleep whenever it has nothing to do.
floitsch12/15/2022 09:01 AM
Things to do are: - connecting to the server (max offline) - running user programs (defined by their specification)
floitsch12/15/2022 09:03 AM
If you set max offline to more than 1 minutes and install an application with interval 1 minute it will deep sleep one minute after each invocation.
floitsch12/15/2022 09:03 AM
Don't remember if the run time of the application is added or not.
DunjinnLord12/15/2022 09:05 AM
Thank you for the answer. So I can't directly make it enter deep sleep? There's no method or anything I can use for it?
floitsch12/15/2022 09:06 AM
You can't. Programs run independently and having one program turn off the device would violate that.
floitsch12/15/2022 09:07 AM
I can have another look, but usually the specification was good enough for all scenarios.
floitsch12/15/2022 09:08 AM
Any particular use case you have in mind?
DunjinnLord12/15/2022 09:11 AM
It was mainly so I had a some more control. My intention was to use it to make my device reset. And because I saw it was used in the weather station tutorial in the documentation.
floitsch12/15/2022 09:13 AM
With v1 you would just write into the specification that it should run every 15s.
floitsch12/15/2022 09:14 AM
If you set the interval to something small you could just return from the program with exit and the device should go to deep sleep (assuming some max offline)