Tutorial 2: Digital Read and Write

Knight LightsKnight LightsNow let's put some of this stuff together into a new circuit. You'll need four LEDs, four 220 ohm or 470 ohm resistors, one 1K ohm resistor, a push button, and a bunch of wires.

Hook four wires into the Arduino's digital outputs (check the code to see which ones.) Connect the smaller resistors to each of those wires, then connect an LED to each resistor with its short leg to ground. Be sure to hook up the 5V and GND lines between your Arduino and breadboard.

Connect the 1K resistor to ground (this is a pull down) and to one pole of the switch. Hook that same pole to the input on the arduino. Hook the other pole to the 5V source.

You're all set!