Best Answer hanzibal, 21 April 2013 - 01:25 PM
Yes, you can use all digital pins to drive led and while specs says each pin can source a maximum of 25mA, you can only pull ~125mA in total. This means the sum of all the LEDs must not exceed 125mA. Pulling 20mA through a LED will make it shine very brightly, I'd say 5 to 8 mA would suffice. 5mA per LED would yield a total of 70mA which would keep you on the safe side. If you need more power, you can have an NPN transistor control each LED. The transistor will only consume a little power in order to turn ON by letting just a little current flow in though the base via a resistor, while the collector-emitter current can be much higher as can voltage, say 30V or more depending on the type of transistor. You could use an external power source to make sure you don't exceed the max ~500mA of your USB port (assuming that is your power source today). Let me know if you need help on how to wire up your transistors. Go to the full post