Introduction to Arduino Interrupts and the ATmega328 Analog Comparator
Interrupts are exactly what they sound like. They are events that cause a microcontroller’s CPU to stop executing a main program in order to execute a snippet of code on the side. As an example, here I discuss how the analog comparator on the ATmega328 (Arduino Uno) can be configured to generate an interrupt. Let