• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Modifying ESP32 Data Logging Temperature to MicroSD Card to Also Control a 25 kHz PWM Fan

Q&A Forum › Category: ESP32 › Modifying ESP32 Data Logging Temperature to MicroSD Card to Also Control a 25 kHz PWM Fan
0 Vote Up Vote Down
radiovan7 asked 1 year ago

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

Question Tags: 10 minute delay, micros, RTC, Wait
1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

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

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.