const int green = 27;
const int yellow = 14;
const int red = 12;
/* */
void setup() {
//Note If you want code to run once put it in the setup
Serial.begin(9600);
pinMode(green,OUTPUT);
pinMode(yellow,OUTPUT);
pinMode(red,OUTPUT);
//If you want the green light to switch on and run once
/*
digitalWrite(green, HIGH);
delay(1000)
Serial.println("Green Light ")
*/
}
void loop() {
// put your main code here, to run repeatedly:
//Green Light
digitalWrite(green,HIGH);
Serial.println("Green Light");
delay(1500);
digitalWrite(green,LOW);
delay(1000);
//Yellow light
digitalWrite(yellow,HIGH);
Serial.println("Yellow Light");
delay(1500);
digitalWrite(yellow,LOW);
delay(1000);
//Red light
digitalWrite(red,HIGH);
Serial.println("Red Light");
delay(1500);
digitalWrite(red,LOW);
delay(1000);
}