#define LED_GREEN 8
#define LED_YELLOW 9
#define LED_RED 10
#define LED_GREEN2 11
#define LED_YELLOW2 12
#define LED_RED2 13
void setup() {
pinMode(LED_GREEN, OUTPUT);
pinMode(LED_YELLOW, OUTPUT);
pinMode(LED_RED, OUTPUT);
digitalWrite(LED_GREEN, HIGH);
digitalWrite(LED_YELLOW, HIGH);
digitalWrite(LED_RED, HIGH);
pinMode(LED_GREEN2, OUTPUT);
pinMode(LED_YELLOW2, OUTPUT);
pinMode(LED_RED2, OUTPUT);
digitalWrite(LED_GREEN2, HIGH);
digitalWrite(LED_YELLOW2, HIGH);
digitalWrite(LED_RED2, HIGH);
}
void loop() {
//Step 1 Traffic Light GREEN On
digitalWrite(LED_GREEN, LOW);
digitalWrite(LED_YELLOW, HIGH);
digitalWrite(LED_RED, HIGH);
digitalWrite(LED_GREEN2, HIGH);
digitalWrite(LED_YELLOW2, HIGH);
digitalWrite(LED_RED2, LOW);
delay(8000);
//Step 2 Traffic Light YELLOW On
digitalWrite(LED_GREEN, HIGH);
digitalWrite(LED_YELLOW, LOW);
digitalWrite(LED_RED, HIGH);
// digitalWrite(LED_RED2, LOW);
delay(5000);
//Step 3 Traffic Light RED On
digitalWrite(LED_GREEN, HIGH);
digitalWrite(LED_YELLOW, HIGH);
digitalWrite(LED_RED, LOW);
digitalWrite(LED_GREEN2, LOW);
digitalWrite(LED_RED2, HIGH);
delay(8000);
digitalWrite(LED_GREEN2, HIGH);
digitalWrite(LED_YELLOW2, LOW);
digitalWrite(LED_RED2, HIGH);
delay(8000);
}