Professional embedded
Hardware interrupt
Intermediate40 min
React instantly to an external event without polling the pin in a loop.
What you get
A pulse counter that never misses an event, even during a long computation.
Parts (simulated)
- Arduino UNO board
- Push button
- LED and 220 Ω resistor
Nothing to buy: every component here is simulated in the browser.
Project steps
- 01Compare polling and interrupts on the same circuit.
- 02Attach an interrupt routine to a pin.
- 03Respect the three ISR rules: short, non-blocking, no Serial.
- 04Declare shared variables as volatile.
What you learn
- Hardware interrupts
- The volatile keyword
- Debouncing
- Polling vs interrupts
Other projects
- ⌚ Smartwatch
Build a complete watch: OLED screen, DS3231 real-time clock, navigation buttons, then the printed board that goes with it.
- 📺 Mini colour TV (SPI TFT)
The finish line of a 10-project display series: from a single pixel to a colour panel driven over SPI.
- 📻 Digital PMR446 walkie-talkie
A full radio link on the PMR446 band: modulation, channel, noise, demodulation and quality measurement.
- 📱 4G/LTE cellular phone
Understand how a phone attaches to a cell: OFDM modulation, mobility, echoes and useful throughput.