0Pricing
Arduino & IoT Academy · Lesson

Run Two Things at Once

Blink and read a button simultaneously.

The Multitasking Dream

Real devices do many things at once: blink a light while watching a button. With non-blocking timing your board can finally juggle both.

Each Task Gets Its Timer

The trick is one timer per task. Give the blink its own previousMillis and interval, separate from anything else you want to run.

All lessons in this course

  1. int, float, bool on Arduino
  2. Why delay() Blocks Everything
  3. Blink Without delay Using millis
  4. Run Two Things at Once
← Back to Arduino & IoT Academy