When you start working with LEDs, invariably you ask... what size resistor do I need for X?
For folks like me that never memorized the equation ...
http://led.linear1.org/led.wiz So for example, if you have a 9v battery... and you want 3 LEDs in your "whatever" ... what size resistor do you need?
Say you have some LEDs that are 20 mA (milliamp - your packaging on the LED or seller will tell you - if you don't know for sure assume 20 mA for most LEDs) and have a voltage of between 2.0 and 2.4 volts. Since I like to build safety into the system, I will use the halfway point and say these are 2.2 volt LEDs.
So into the above wizard, I punch in
9 = as my 'Source voltage'
2.2 = as my 'diode forward voltage'
20 = as my 'diode forward current (mA)'
3 = as the 'number of LEDs in your array'
Then I select 'Wiring Diagram' and check 'Help with Resistor Color Codes' then click 'design my array'
It spits back that I need a 120 ohm resistor (R = 120 ohms). The "wiring diagram" will even show you how to hook everything up.
... Just remember the "long" pole on a LED is positive (anode). The rest should be straightforward.
+9V 




R = 120 ohms