Project: Electronics Bash - #18- Timers
To this point, we've been handling all of the timing and timekeeping in our Arduino programs by hand. If the-next-thing needs to happen at a specific time, or a specific number of milliseconds from now, we've been tracking all that with variables and millis() statements and so on. What if there wa a way for that all to be taken care of in the background, automatically? And what if it was something we'd been doing all along without our knowing it?
Topics Include:
- Timers in the ATmega328
- Timer Interrupts and Configuration
- Timers and built-in Functions (AnalogWrite, Tone, Millis, Delay, Servo)
- Using timers to build new code
Code
Print Timer
Click here to view code on GithubPrint Timer Interrupts
Click here to view code on GithubBlink Interrupts
Click here to view code on GithubAdjustable Speed Blink
Click here to view code on GithubTone Interrupts
Click here to view code on GithubTone Interrupts - Serial
Click here to view code on GithubTone List
Click here to view code on GithubPitches.h
Click here to view code on GithubSnakeMusic.ino
Click here to view code on Github