Check out this tutorial about Processor Interrupts with Arduino.
Today we have a new tutorial all about Processor Interrupts with Arduino. First, let's talk a little bit about what an "interrupt" is. No, it's not the guy from down the hall who comes in your office every five minutes to chat. Rather, an interrupt in this context describes when a processor is performing its normal program while waiting for some kind of event - or an "interrupt." It could be the push of a button, the presence of a certain level of ambient light, or any number of disruptive-type things.
In this tutorial from SparkFun Engineer Jordan, he explains the basics of using an interrupt function, what the benefits are, and provides some sample code so you can start playing around with interrupts on your own. Check out the tutorial for more information!