Introduction: Stop, Interrupt

Picture of 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.

Step 1: Things You Will Need

Picture of Things You Will Need

  1. 4 LEDs
  2. 8 jumper wires
  3. 5 resistors (220 Ohm)
  4. 1 pushbutton
  5. 1 Arduino Uno Board
  6. 1 breadboard

Step 2: Add an LED

Picture of 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.

Step 3: Connect Your Pushbutton

Picture of 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.

Step 4: Wrapping Up

Picture of 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

Comments

About This Instructable

44views

2favorites

License:

More by Stoogle:Stop, InterruptSimon SaysSpeak to Me
Add instructable to: