Stop, Interrupt
This instructable is an example of how to use the interrupt capabilities of the Arduino. The code below will interrupt a sequence of LED blinks and output an ASCII hammer to the serial monitor.
Things You Will Need
- 4 LEDs
- 8 jumper wires
- 5 resistors (220 Ohm)
- 1 pushbutton
- 1 Arduino Uno Board
- 1 breadboard
Add an LED
Connect an LED to pin 3 on your Arduino board. use a 220 ohm resistor to do this. Make sure to ground the shorter pin. Repeat this for the other LEDs for pins 6, 9, and 12.
Connect Your Pushbutton
Place your pushbutton in between the bridge of your breadboard and connect it to pin 2 on your Arduino board and connect the pin diagonal on the button to the hot rail. Using a 220 ohm resistor, ground the button using the pin next to the one that is connected to the hot rail.
Wrapping Up
All that's left to do is connect the hot and cold rails to the 5v and ground pins on the Arduino. Now download the code and run it.
Hammer Ascii art from http://ascii.co.uk/art/hammer