Stop, Interrupt

by Stoogle in Circuits > Arduino

386 Views, 3 Favorites, 0 Comments

Stop, Interrupt

4.PNG

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

1.PNG

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

Add an LED

2.PNG

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

3.PNG

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

4.PNG

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

Downloads