user13181: I am very much new to Arduino. I recently bought an adruino uno. i can blink an LED alternately. Such as, 1st blink red, then blink green, then blue like that. once only one LED should blink. 
I have provided the code blinking an LED. How to modify this to blink multiple LED one after another.
void setup() {

  pinMode(13, OUTPUT);

}

void loop() {

  digitalWrite(13, HIGH);
  delay(1000);
  digitalWrite(13, LOW);
  delay(1000);
} 


user10794: You could always copy and paste:
void setup() {

  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);

}

void loop() {

  digitalWrite(11, HIGH);
  delay(1000);
  digitalWrite(11, LOW);
  delay(1000);

  digitalWrite(12, HIGH);
  delay(1000);
  digitalWrite(12, LOW);
  delay(1000);

  digitalWrite(13, HIGH);
  delay(1000);
  digitalWrite(13, LOW);
  delay(1000);
} 


A bit better would be to learn about functions:
void setup() {

  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);

}

void blink (const byte which)
  {
  digitalWrite(which, HIGH);
  delay(1000);
  digitalWrite(which, LOW);
  delay(1000);
  }  // end of blink

void loop() {
  blink (11);
  blink (12);
  blink (13);
} 


And you could learn about loops:
void setup() {
  for (int i = 11; i <= 13; i++)
    pinMode(i, OUTPUT);
}

void blink (const byte which)
  {
  digitalWrite(which, HIGH);
  delay(1000);
  digitalWrite(which, LOW);
  delay(1000);
  }  // end of blink

void loop() {
  for (int i = 11; i <= 13; i++)
     blink (i);
} 


There is a whole world of stuff to learn. Enjoy the process!

13181: <p>I am very much new to Arduino. I recently bought an adruino uno. i can blink an LED alternately. Such as, 1st blink red, then blink green, then blue like that. once only one LED should blink. </p>

<p>I have provided the code blinking an LED. How to modify this to blink multiple LED one after another.</p>

<pre><code>void setup() {

  pinMode(13, OUTPUT);

}

void loop() {

  digitalWrite(13, HIGH);
  delay(1000);
  digitalWrite(13, LOW);
  delay(1000);
} 
</code></pre>
 10794: 

<p>You could always copy and paste:</p>

<pre class="lang-C++ prettyprint-override"><code>void setup() {

  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);

}

void loop() {

  digitalWrite(11, HIGH);
  delay(1000);
  digitalWrite(11, LOW);
  delay(1000);

  digitalWrite(12, HIGH);
  delay(1000);
  digitalWrite(12, LOW);
  delay(1000);

  digitalWrite(13, HIGH);
  delay(1000);
  digitalWrite(13, LOW);
  delay(1000);
} 
</code></pre>

<hr>

<p>A bit better would be to learn about functions:</p>

<pre class="lang-C++ prettyprint-override"><code>void setup() {

  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);

}

void blink (const byte which)
  {
  digitalWrite(which, HIGH);
  delay(1000);
  digitalWrite(which, LOW);
  delay(1000);
  }  // end of blink

void loop() {
  blink (11);
  blink (12);
  blink (13);
} 
</code></pre>

<hr>

<p>And you could learn about loops:</p>

<pre class="lang-C++ prettyprint-override"><code>void setup() {
  for (int i = 11; i &lt;= 13; i++)
    pinMode(i, OUTPUT);
}

void blink (const byte which)
  {
  digitalWrite(which, HIGH);
  delay(1000);
  digitalWrite(which, LOW);
  delay(1000);
  }  // end of blink

void loop() {
  for (int i = 11; i &lt;= 13; i++)
     blink (i);
} 
</code></pre>

<hr>

<p>There is a whole world of stuff to learn. Enjoy the process!</p>
