#define ledMerah 19
#define ledKuning 18
#define ledHijau 5
#define button 15
void setup() {
pinMode(ledMerah, OUTPUT);
pinMode(ledKuning, OUTPUT);
pinMode(ledHijau, OUTPUT);
}
void loop() {
if (digitalRead(button)==HIGH)
{
digitalWrite(ledKuning,HIGH);
delay(3000);
digitalWrite(ledKuning,LOW);
digitalWrite(ledMerah,HIGH);
delay(5000);
digitalWrite(ledMerah,LOW);
digitalWrite(ledKuning,HIGH);
delay(2000);
digitalWrite(ledMerah, LOW);
digitalWrite(ledKuning, LOW);
digitalWrite(ledHijau,HIGH);
delay(3000);
digitalWrite(ledMerah, LOW);
digitalWrite(ledKuning, LOW);
digitalWrite(ledHijau,LOW);
}
}