Not enough ground

I am a begginer with arduino and am currently trying to make a set of 4 LED light light up One at a time, I connected a wire from one of the 3 ground pins to the breadboard's negative rail, I then connected all of the ground wires for the LED's to the rail, ran the code and none of them worked. Then i connected 2 of them to the remaining ground pins and those 2 lit up. i'm not sure what to do.

Please show us your code, a wiring diagram and good photos of your actual circuit.

@cooper_dog
Welcome to Arduino Forum.
I would request you to post your circuit diagram and the code you have used (in code tags).
Also mention the type of arduino you are using.

I believe you should read this post. This will tell you how to create a post and what to include in it so that we can help you.

  • You might have the LEDs installed backwards, flat side is the Cathode.

Like this

Some breadboards have a break in the ground and power rails at the center of the board, so be careful if you have the power and ground connections on one end of the breadboard and circuitry connected near the other end.

1 Like

This is the code.

const int LED1=10;
const int LED2=11;
const int LED3=12;
const int LED4=13;


void setup() {
  // put your setup code here, to run once:
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
pinMode(LED4, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(LED1, HIGH);
delay(300);
digitalWrite(LED2, HIGH);
delay(300);
digitalWrite(LED3, HIGH);
delay(300);
digitalWrite(LED4, HIGH);
delay(300);
digitalWrite(LED1,LOW);
delay(300);
digitalWrite(LED2, LOW);
delay(300);
digitalWrite(LED3, LOW);
delay(300);
digitalWrite(LED4, LOW);
delay(300);



}

The code is fine

thanks. it will not let me post pictures though.

Thats OK
Do you have it connected like I show?

where?

Post #6

gime a a second to change it
its not the same.

the problem is i have 4 LED's?
I'm not sure if that is possible.

Make sur the side of the LED with the Flat spot is connected to GND

i completely rewired it ad now it works completely fine. thanks!

Great
Now have fun!

I will. thanks so much!

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