An Introduction to Embedded Programming
using the Arduino
Some friends have become interested in doing some embedded or bare-metal programming. I've started writing some articles on the subject to help them get started. This repository contains the code examples for this.
This getting started project goes through digital output via a blinking LED (the microcontroller hello world) and serial output with the AVR microcontroller.
The interrupts and timers project covers the first half of the article; it demonstrates a simple timer interrupt to blink the LED.
The strobe project works with an IR proximity detector built with a 38 kHz IR LED strobe and an IR receiver. It demonstrates more advanced interrupts, including both timer interrupts and pin change interrupts.
The addresses project includes a custom header for referencing PORTB and DDRB. It's intended to demystify some of how things work under the hood.
The analog sensors project uses an interrupt-driven analog ultrasonic ranging sensor demo.
All the code here is licensed under the MIT license unless otherwise noted.