The data logging to MicroSD card works great by itself. I modified it to collect data every 10 minutes from two DHT sensors. Now I would like to add some code to control the duty cycle to a 25 kHz ATX fan.
I tried using an outboard Arduino mini with I2C since PWM won’t work continuously on the ESP32 in deep sleep mode. The Arduino code worked perfectly but I didn’t get the ESP32 to boot when the two processors were connected.
I would much rather keep the ESP32 running in active or modem sleep mode and eliminate the separate Arduino by moving the data collection from setup() into loop(). What’s the easiest way to do a simple 10 minute delay that’s accurate to a few seconds?
I haven’t yet found any good examples of delays for the ESP32 from my searches for millis and micros delay routines.
Thanks,
Bill
Hi.
I think the best thing is to use TaskManager: https://github.com/briankimstudio/TaskManager
Where you can schedule tasks to run periodically at certain intervals.
Unfortunately, at the moment, we don’t have any tutorials about that specific subject.
I hope this helps.
Regards,
Sara