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.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: 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

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

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

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

Be the First to Share

    Recommendations

    • CNC Contest

      CNC Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    Discussions