Light & Variables

Description:

When the arduino detects a signal from pin 1, the LED will turn on. When the arduino detects a signal from pin 2, the LED will turn off.

Important Notes:

StackOverflow user Caleb Kleveter

Materials:

Instructions:

  1. Orient the breadboard so that the smallest column number is on the left, and the greatest is on the right.
  2. Connect the two positive power rails together and the two negative power rails together. This should be done at the very end (edge) of the breadboard.
  3. Connect the switch to the bridge of the breadboard (F3-F5 : E3-E5)
  4. Connect one side of the switch to positive (G3 to Vcc) and a 1k resistor to negative (B5-Ground). Connect them in a diagonal pattern.
  5. Take the arduino and connect the switch from the Vcc side (D5-Dig3) to Dig3 on the digital side (right side) of the arudino.
  6. Connect the LED to the board (E28 positive side of LED, E27 negative side of LED) and connect the 1k resistor to the negative side of the LED (B27-Ground).
  7. With a wire, Connect the positive end of the LED to Dig2 on the arduino (D28-Dig2).
  8. Connect a wire from Vcc and connect it to the 5V on the analog side of the arduino (left side).
  9. Connect the ground side of the breadboard to the digital ground side of the arduino (right side).

Schematic/Breadboard diagram:

Created by the hardware group Wayne, Anil and Hashir. Created by the hardware group Wayne, Anil and Hashir.

Demonstration:

Related: Variables Software Tutorial Next Tutorial