Processor Interrupts with Arduino
Interrupts - what are they? They are people that intermittently prevent you from doing your current work. Ha! Well maybe... but what we really want to know is what they are in the context of embedded electronics and microprocessors.
So let's ask that again - what is an interrupt? In a nutshell, there is a method by which a processor can execute its normal program while continuously monitoring for some kind of event, or interrupt. There are two types of interrupts:
Hardware Interrupts - These occur in response to an external event, like a pin going high or low.
Software Interrupts - These occur in response to a software instruction.
Generally speaking, most 8-bit AVR microcontrollers (i.e. Arduinos) aren't innately capable of software interrupts, so for the purposes of this tutorial, we will focus on hardware interrupts.
If you aren’t familiar with the following concepts, we recommend checking out these tutorials before continuing.