Pulse counting and Deep Sleep
Posted: Tue Jan 21, 2020 9:19 am
Dear All,
I am just a beginner with ESP-32 and need a tip how I solve a problem with my sensors.
Structure is as follows:
- ESP32 wakes up from deep sleep after a defined time, powers up all sensors via a MOSFET SSR and then read all attached sensors and then falls back asleep.
- after all sensors are read it sends via ESPnow the data to an indoor station.
So far all works well with temperature, humidity, pressure, but there is a problem when it comes to counting impulses for example from a anemometer or a Geiger counter. when I had the whole code separated in void setup and void loop all was working, but as I understand I can not use a loop together with deep sleep mode. Is that correct?
Second question is if there is an other way to count falling flanks for 20 seconds and then go to deep sleep again
Any tip is welcome.
I am just a beginner with ESP-32 and need a tip how I solve a problem with my sensors.
Structure is as follows:
- ESP32 wakes up from deep sleep after a defined time, powers up all sensors via a MOSFET SSR and then read all attached sensors and then falls back asleep.
- after all sensors are read it sends via ESPnow the data to an indoor station.
So far all works well with temperature, humidity, pressure, but there is a problem when it comes to counting impulses for example from a anemometer or a Geiger counter. when I had the whole code separated in void setup and void loop all was working, but as I understand I can not use a loop together with deep sleep mode. Is that correct?
Second question is if there is an other way to count falling flanks for 20 seconds and then go to deep sleep again
Any tip is welcome.