Trying to make a series of Arduino leds with one pin

I am curently working on a arduino project. Where i am trying to make trafic intersection. The problem is that I am limited in my use of pins and therfore need to use same pin for multible Leds. I have added a picture for refrence showing my firts atempt. I figured i would be possible to have leds of the same colur sharing output. Only the first row of trafic lights are currently active. I would appriciate any type of help.

I can't see an attachment

Which Arduino are you using and have you used the analogue pins ?

We are using an arduino uno r3. We have used digital pins. I will try to reupload.

You can also use the analogue pins as digital pins

Sorry, but your picture is meaningless. Please post a schematic. A photo of a hand drawn schematic is OK


Hi, @jacobia
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".

Are you using the analog input pins?
You can use them as digital pins.

int inputPin = A0;
void setup()
pinMode(inputPin, INPUT);

Tom... :grinning: :+1: :coffee: :australia:

From what you have posted, you are using three pins to control the three LEDs.

I can't see your problem from your diagram.

Tom... :grinning: :+1: :coffee: :australia:

3 of your LEDs are shorted by the breadboard. Think about how the holes in the breadboard are connected inside the breadboard.

You can use smart LEDs like neopixel then you can have the whole traffic system controled with 1 wire and flexible as well if you need to add more traffic lights in the future

A view of a breadboard from the back side.

the problem in this case is i am trying to use 6 leds on three pins. But thank you :smiley:

The LEDs have a specification Vf.

This is the voltage across the diode when illuminated. Two in series adds up, so if you put two LEDs in series, you need to add the Vf voltages, then calculate an appropriate current limiting resistor.

If the Vf sum is too high, you will not be able to illuminate them from an I/O pin which provides nominally only 5 volts.


So rearrange them on the breadboard so that 3 of them are not short circuited

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.