user21607: i have just started learning Arduino, so please be patient to me :)
Why doesnt my circuit below doesn't work?

Here's the code:
#define led_green 2
#define led_yellow 8
#define led_red 13

void setup() {
  pinMode(led_green, OUTPUT);
  pinMode(led_yellow, OUTPUT);
  pinMode(led_red, OUTPUT);

  // Strarting all turned off
  digitalWrite(led_green, LOW);   
  digitalWrite(led_yellow, LOW);  
  digitalWrite(led_red, LOW);  
}


void loop() {
digitalWrite(led_red, HIGH);

delay(1000);

digitalWrite(led_red, LOW);
digitalWrite(led_green, HIGH);

delay(1000);

digitalWrite(led_green, LOW);
digitalWrite(led_yellow, HIGH);

delay(1000);

digitalWrite(led_yellow, LOW);

}

I'm trying to reproduce this circuit that I saw in a tutorial: 

Thank you.

user20665: If you are doing what is in the first picture then you're doing it wrong.
You have to make sure the led is horizontal, not vertical. The signal is going through the led and not making it into ground. And your ground is in the same lane as your signal.
I think you should learn how breadboards work and then move on from there. Its pretty simple and I think you'll learn it quickly.
For your code part, instead of defining the variables, you could just use int.
 Refer to this as a starter tutorial, https://www.arduino.cc/en/Tutorial/.


This is how your wiring should look like if you followed the tutorial, 

21607: <p>i have just started learning Arduino, so please be patient to me :)</p>

<p>Why doesnt my circuit below doesn't work?</p>

<p><a href="https://i.stack.imgur.com/lmIQg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lmIQg.jpg" alt="enter image description here"></a></p>

<p>Here's the code:</p>

<pre><code>#define led_green 2
#define led_yellow 8
#define led_red 13

void setup() {
  pinMode(led_green, OUTPUT);
  pinMode(led_yellow, OUTPUT);
  pinMode(led_red, OUTPUT);

  // Strarting all turned off
  digitalWrite(led_green, LOW);   
  digitalWrite(led_yellow, LOW);  
  digitalWrite(led_red, LOW);  
}


void loop() {
digitalWrite(led_red, HIGH);

delay(1000);

digitalWrite(led_red, LOW);
digitalWrite(led_green, HIGH);

delay(1000);

digitalWrite(led_green, LOW);
digitalWrite(led_yellow, HIGH);

delay(1000);

digitalWrite(led_yellow, LOW);

}
</code></pre>

<p>I'm trying to reproduce this circuit that I saw in a tutorial: </p>

<p><a href="https://i.stack.imgur.com/xwl6c.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xwl6c.jpg" alt="enter image description here"></a></p>

<p>Thank you.</p>
 20665: <p>If you are doing what is in the first picture then you're doing it wrong.</p>

<p>You have to make sure the led is horizontal, not vertical. The signal is going through the led and not making it into ground. And your ground is in the same lane as your signal.</p>

<p>I think you should learn how breadboards work and then move on from there. Its pretty simple and I think you'll learn it quickly.</p>

<p>For your code part, instead of defining the variables, you could just use <code>int</code>.
<br> Refer to this as a starter tutorial, <a href="https://www.arduino.cc/en/Tutorial/" rel="nofollow noreferrer">https://www.arduino.cc/en/Tutorial/</a>.
<br>
<a href="https://i.stack.imgur.com/NGQFq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NGQFq.png" alt="This how the breadboard is connected underneath. "></a></p>

<p>This is how your wiring should look like if you followed the tutorial, <a href="https://i.stack.imgur.com/fVlVt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fVlVt.png" alt="enter image description here"></a></p>
