Red Light emitting diode (LED). Like all diodes power only goes through this LED one direction – in through the long positive leg and out through the shorter negative leg.
Safely lighting an LED
These LEDs are rated for 20ma (ideal) and 30ma (max). Exceed the amperage and the the LED will burn out almost instantly. So how do we “choke” the current to prevent this? Ohm’s law says Voltage = Amperate * Resistance. An Arduino runs at 5v. Rearranging the equation gets Resistance = 5000mv / 20ma, or Resistance = 250 Ω. So by putting a ~250Ω resistor in in a circuit with an LED and the 5v power source from your Arduino will safely light the LED.