[LED wired to an Arduino, just for power]

LEDs and resistors

LED (right) stands for "Light Emitting Diode".

A diode is an electronics component that only lets electricity flow in one direction. One of its leads is longer than the other: that's the positive lead, the one that goes to your 5v connection. The shorter wire, the negative lead, goes to ground (Gnd).

When you put an LED in a circuit, you need to put a resistor in series with it to limit the current that flows through the LED. Otherwise the LED will burn out right away.


A resistor (left) limits the amount of current flowing through a wire. If you think of the wire as being a pipe electricity flows through, you can think of a resistor as being a narrow part of that pipe, that chokes off the flow.

Resistors don't have positive and negative sides -- you can hook them up in either direction and they work just the same.
[LED wired to an Arduino, just for power]

Wire up your LED

Let's make sure the LED turns on. We'll use the Arduino just as a 5 volt power source, for now.

Plug your Arduino in to the computer's USB port. A power light should come on.

Wire up your LED as shown at right. Plug the LED into your breadboard, remembering which side is the longer leg (+). You might have to bend the legs a little to get them both to plug in. That's fine.

Connect a wire (a black one if possible) from the LED's - leg to the Arduino's GND. (The Arduino has several GND ports. You can use any of them -- they're all the same.)

Run another wire from the Arduino's 5v to the breadboard. Then connect a resistor from that wire to the LED's + leg.

Your LED should light up!