i hope somebody can help me with that.
Currently i'm developing a soil moisture sensor with an ESP32 (MH-ET Live MiniKit).
The prorgamming is done in c++ using Platform.io in VsCode.
The ESP gets controlled by MQTT messages and so far everything is working find.
I'm sending the deep sleep time to the ESP using MQTT.
During the day, it gets put to sleep for 300s, during the night it should sleep for 3600s.
And exactly this is my problem. As far as I send the ESP to sleep for 3600s , it immediately wakes up.
My code is plain simple:
Code: Select all
#define uS_TO_S_FACTOR 1000000L /* Conversion factor for micro seconds to seconds */ ... ret = esp_sleep_enable_timer_wakeup(3600* uS_TO_S_FACTOR);
Does anybody have an idea what could be the reason?
There are no peripherals connected to the ESP so far, so it definitely isn't another wakeup trigger.