#define LEDRED1 2
#define LEDYELLOW1 3
#define LEDGREEN1 4
#define LEDRED2 5
#define LEDYELLOW2 6
#define LEDGREEN2 7
#define LEDRED3 8
#define LEDYELLOW3 9
#define LEDGREEN3 10
#define LEDRED4 11
#define LEDYELLOW4 12
#define LEDGREEN4 13
void setup()
{
pinMode(LEDRED1, OUTPUT);
pinMode(LEDYELLOW1, OUTPUT);
pinMode(LEDGREEN1, OUTPUT);
pinMode(LEDRED2, OUTPUT);
pinMode(LEDYELLOW2, OUTPUT);
pinMode(LEDGREEN2, OUTPUT);
pinMode(LEDRED3, OUTPUT);
pinMode(LEDYELLOW3, OUTPUT);
pinMode(LEDGREEN3, OUTPUT);
pinMode(LEDRED4, OUTPUT);
pinMode(LEDYELLOW4, OUTPUT);
pinMode(LEDGREEN4, OUTPUT);
}
void loop()
{ digitalWrite(LEDRED4,HIGH);
digitalWrite(LEDRED3,HIGH);
digitalWrite(LEDRED2,HIGH);
digitalWrite(LEDRED1,HIGH);
digitalWrite(LEDYELLOW1,HIGH);
delay(2000);
digitalWrite(LEDGREEN1,HIGH);
digitalWrite(LEDYELLOW1,LOW);
digitalWrite(LEDRED1,LOW);
delay(10000);
digitalWrite(LEDGREEN1,LOW);
digitalWrite(LEDRED1,HIGH);
digitalWrite(LEDRED2,HIGH);
digitalWrite(LEDYELLOW2,HIGH);
delay(2000);
digitalWrite(LEDGREEN2,HIGH);
digitalWrite(LEDYELLOW2,LOW);
digitalWrite(LEDRED2,LOW);
delay(10000);
digitalWrite(LEDGREEN2,LOW);
digitalWrite(LEDRED2,HIGH);
digitalWrite(LEDRED3,HIGH);
digitalWrite(LEDYELLOW3,HIGH);
delay(2000);
digitalWrite(LEDGREEN3,HIGH);
digitalWrite(LEDYELLOW3,LOW);
digitalWrite(LEDRED3,LOW);
delay(10000);
digitalWrite(LEDGREEN3,LOW);
digitalWrite(LEDRED3,HIGH);
digitalWrite(LEDRED4,HIGH);
digitalWrite(LEDYELLOW4,HIGH);
delay(2000);
digitalWrite(LEDGREEN4,HIGH);
digitalWrite(LEDYELLOW4,LOW);
digitalWrite(LEDRED4,LOW);
delay(10000);
digitalWrite(LEDGREEN4,LOW);
digitalWrite(LEDRED4,HIGH);
}
Comments