Skip to content

SALES INQUIRIES: 1 (888) 767-9864

Arduino millis() – The Beginners Guide to multi-tasking with Arduino using millis()

Arduino millis() or delay() – which should I use? How can I time multiple events with Arduino? How can I multi-task with Arduino? Can I still get inputs and have timed events? What is a hardware clock anyway?

So many questions about Arduino timing…so little time?

Which is why we created this Ultimate Guide to using the Arduino millis() function.

We have created 6 in-depth video lessons that include written tutorials and code as well – all covering using millis() and delay()

Below are links and topics covered in this mini-series training:

Lesson 1: millis() Arduino Function: 5+ things to consider

Topics covered:

  • What is a hardware clock?
  • Timer/Counter() modules
  • How to “get” the value from millis()
  • Storing the value of millis()
  • Doing math with unsigned longs (variables that are perfect for storing millis values)

millis() Arduino function: 5+ things to consider

Lesson 2: delay() Arduino Function: Tight loops and blocking code

Topics covered:

  • Tight loops
  • Blocking code

delay() Arduino Function: Tight Loops and Blocking Code

Lesson 3: millis() vs delay()

Topics covered:

  • The simple timed event
  • The not so simple timed event

Millis vs. Delay Part 3 | A mini-series on Timing Events with Arduino Code

Lesson 4: When delay() should be millis() instead

Topics covered:

  • Issues with inputs and delay()

When delay() should be millis() instead: Part 4

Lesson 5: Arduino Sketch with millis() instead of delay()

Topics covered:

  • Quick review of the millis function
  • The millis timeline
  • Create once-off timed events
  • Create repetitive timed events

Arduino Sketch with millis() instead of delay()

Lesson 6: Doing multiple timed things with Arduino: Unleash the millis()!

Topics covered:

  • Map out a program with 2 INDEPENDENT timed events
  • Code from scratch a program using millis() to time 2 repetitive events

Doing multiple timed things with Arduino: Unleash the millis()!

 

Have more questions about using millis()? Let us know in the comments below!

1 Comment

  1. […] post Arduino millis() – The Beginners Guide to multi-tasking with Arduino using millis() appeared first on Programming Electronics […]

Leave a Comment