Introduction: Lab Interrupt
in this instructable, you will learn to set up a simple interrupt project.
after completing this project, one of the two led's will be on the whole time until the button is pressed. At that point, the main led will shut off and the interrupt led will turn on.
Step 1: Set Up a Button
For this step you will need a button and a 220ohm resistor.
Start by placing the button on the bread board.
Next, place the resistor on one side of the button as shown in the picture and ground it to the ground rail.
Directly across from the resistor will be where your remote wire goes. Connect that wire to the number 2 port on the arduino.
Connect a wire from the other side of the button to the positive rail.
Connect the 5v port and GRND port to the positive and negative rail of the bread board.
Step 2: Add an LED to Indicate the Interrupt
For this step you will need an LED and 220ohm resistor.
Start by placing an led on the bread board.
next, ground the negative lead of the led to the ground rail.
lastly, connect the resistor to the positive lead of the led and connect it into the port 13 of the arduino.
Step 3: Place a Second LED
for this step you will need an LED and 220ohm resistor.
just like the previous step before, place the led on the bread board
connect the resistor from the positive lead of the led to the number 12 port on the arduino.
lastly, connect the negative lead of the led to the negative rail of the bread board.