Hello, I need help on connecting 3 leds (Im new :D)

I have all the cables correctly because i change the cable of the pin it works and viceversa.

int led1 = 12; 
int led2 = 11; 
int led3 = 10;
void setup() 
{
pinMode(led1, OUTPUT); 
pinMode(led2, OUTPUT);  
pinMode(led3, OUTPUT);
}
void loop() 
{
digitalWrite(led1, HIGH); 
digitalWrite(led2, LOW); 
digitalWrite(led3,LOW);
delay(1000); 
digitalWrite(led1, LOW); 
digitalWrite(led2, HIGH);
digitalWrite(led3,LOW);
delay(1000);
digitalWrite(led2,LOW);
digitalWrite(led3,HIGH);
}

Which part do you need help with? You haven't explained your problem particularly well.

Hi,
Welcome to the forum.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you explain what help you need?

Thanks.. Tom... :slight_smile:

Are you perhaps seeing the result of not having a delay() after the digitalWrite(led3,HIGH); so as soon as Led3 is switched on the code immediately jumps to the top of loop() and switches it off again?

Steve