I need to activate a peripheral for a specific time, then sleep for some time, and then deactivate the peripheral again.
I could do this with a simple sleep
but that would keep my ESP32 awake and burn battery. Is there a way to go into deep sleep for the required time and then wake up again?
Ideally I would simple schedule to run a deactivate program after a certain duration.
What's the best way to do this?