Most LEDs work pretty much the same way. Standard package is the T1-3/4. LEDs
want 5-20 mA of current (If) running through them. Current runs through the LED
from anode to cathode. Cathode is marked by the short lead and/or a notch or flat
on the case. Always place a resistor in series. When active, LEDs have a forward
voltage drop (Vf). Here's some Vf/If data for an ordinary LED connected to a 5
V supply through a series resistor. The 330 ohm configuration is recommended.
| 100 ohm
|| 2.2 V
|| 27 mA
| 150 ohm
|| 2.0 V
|| 20 mA
| 330 ohm
|| 1.9 V
|| 9 mA
You can run two LEDs straight off a single Arduino pin. Wire the LEDs in series
and add a series resistance. Two 330 ohm resistors wired in parallel work nicely.
To drive more LEDs off a single Arduino pin, wire in parallel and turn on and
off via a transistor. For more than 4 LEDs, use a separate battery supply.