Friends, I am very new to Arduino and the community as well, just started to learn sketching. Would you please tell me whether is it possible to turn on pins 4 to 13 all at once? I have connected a single LED to each pin. What I sketched is as under:
// put your setup code here, to run once:
void setup()
{
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
pinMode(11,OUTPUT);
pinMode(12,OUTPUT);
pinMode(13,OUTPUT);
}
void loop()
{
digitalWrite(4,HIGH);
delay(100);
digitalWrite(4,LOW);
delay(100);
digitalWrite(5,HIGH);
delay(100);
digitalWrite(5,LOW);
delay(100);
digitalWrite(6,HIGH);
delay(100);
digitalWrite(6,LOW);
delay(100);
digitalWrite(7,HIGH);
delay(100);
digitalWrite(7,LOW);
delay(100);
digitalWrite(8,HIGH);
delay(100);
digitalWrite(8,LOW);
delay(100);
digitalWrite(9,HIGH);
delay(100);
digitalWrite(9,LOW);
delay(100);
digitalWrite(10,HIGH);
delay(100);
digitalWrite(10,LOW);
delay(100);
digitalWrite(11,HIGH);
delay(100);
digitalWrite(11,LOW);
delay(100);
digitalWrite(12,HIGH);
delay(100);
digitalWrite(12,LOW);
delay(100);
digitalWrite(13,HIGH);
delay(100);
digitalWrite(13,LOW);
delay(100);
}
But what is happening is that all the LEDs are not blinking at the same time or at once, what I want. Like LED 1 blinks once and waits for the next blink for all the LEDs to blink once.
I am sorry to put such a childish post in the community but please do understand that I only 5 days that I am with Arduino. God Bless You All.
