#define led_yellow 13
#define led_red 12
#define led_green 14
#define BTN_PIN 15
void setup() {
pinMode(BTN_PIN, INPUT);
pinMode(led_red, OUTPUT);
pinMode(led_yellow, OUTPUT);
pinMode(led_green, OUTPUT);
}
void loop() {
if (digitalRead (BTN_PIN) == HIGH){
delay(200);
digitalWrite(13, HIGH);
delay(3000);
digitalWrite(13, LOW);
delay(200);
digitalWrite(led_red, HIGH);
delay(5000);
digitalWrite(led_red, LOW);
delay(200);
digitalWrite(led_yellow, HIGH);
delay(2000);
digitalWrite(led_yellow, LOW);
delay(200);
digitalWrite(led_green, HIGH);
delay(3000);
digitalWrite(led_green, LOW);
} else {
digitalWrite(14, LOW);
digitalWrite(12, LOW);
digitalWrite(13, LOW);
digitalWrite(14, LOW);
}
}