23/06/2025 5:47 am
Topic starter
Notifications
Clear all
0
I'm working on an Arduino project where I need to run multiple tasks simultaneously—for example, blinking an LED, reading a sensor, and checking for button input. Initially, I used delay() for timing, but I realized it blocks the program and prevents other tasks from running smoothly.
What is the recommended way to handle timing and run multiple tasks without using delay()?
Should I use millis() or is there a better approach like using timers or a task scheduler? I'd appreciate examples or tips on how to structure the code for multitasking in Arduino.