1 pin 8 leds

Hi.
Im having a project which has drained my number of pins that I can use so I was wondering is there any way I could get away with having 8 leds in parallel that are supplyed with 5V that one pin can offer? Or maybe I should split them by having 4 leds on 2 pins. Or maybe there is some other way that I can use that pin to turn LED on and off. Tnx

najkulime:
Hi.
Im having a project which has drained my number of pins that I can use so I was wondering is there any way I could get away with having 8 leds in parallel that are supplyed with 5V that one pin can offer? Or maybe I should split them by having 4 leds on 2 pins. Or maybe there is some other way that I can use that pin to turn LED on and off. Tnx

Arduino pin limit is about 20mA. That current can be used by one LED or by many LEDs.
A common LED with a Vf (working voltage) of ~2volt and a 1k current limiting resistor draws (5volt - 2volt) / 1k = 3mA.
A blue LED with a Vf of ~3.3volt and a 1k resistor draws (5volt - 3.3volt ) / 1k = 1.7mA.

Did you also use up all the analogue pins?
Analogue pins can be used just like digital pins.
Leo..

najkulime:
Hi.
Im having a project which has drained my number of pins that I can use so I was wondering is there any way I could get away with having 8 leds in parallel that are supplyed with 5V that one pin can offer? Or maybe I should split them by having 4 leds on 2 pins. Or maybe there is some other way that I can use that pin to turn LED on and off. Tnx

You can have the LEDs in parallel and drive them off a MOSFET. Make sure you still use a series resistor for each LED

This page shows how you connect the MOSFET, you're interested in the third example with the lightbulb. Just replace the lightbulb with your parallel LEDs. Connect your 5V+ supply where the 0-60V+ goes in. And make sure you don't forget the resistors on your LEDs!