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
- 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)
Lesson 2: delay() Arduino Function: Tight loops and blocking code
- Tight loops
- Blocking code
Lesson 3: millis() vs delay()
- The simple timed event
- The not so simple timed event
Lesson 4: When delay() should be millis() instead
- Issues with inputs and delay()
Lesson 5: Arduino Sketch with millis() instead of delay()
- Quick review of the millis function
- The millis timeline
- Create once-off timed events
- Create repetitive timed events
Lesson 6: Doing multiple timed things with Arduino: Unleash the millis()!
- Map out a program with 2 INDEPENDENT timed events
- Code from scratch a program using millis() to time 2 repetitive events
Have more questions about using millis()? Let us know in the comments below!