void setup() {
// put your setup code here, to run once:
// Set pin mode
pinMode(2, OUTPUT); // LED merah
pinMode(3, OUTPUT); // LED kuning
pinMode(4, OUTPUT); // LED hijau
}
void loop() {
// put your main code here, to run repeatedly:
// LED hijau menyala selama 5s
digitalWrite(4, HIGH);
delay(4000);
digitalWrite(3, HIGH);
delay(1000);
digitalWrite(4, LOW);
digitalWrite(3, HIGH);
delay(3000);
digitalWrite(4, LOW);
digitalWrite(3, LOW);
digitalWrite(2, HIGH);
delay(4000);
digitalWrite(2, LOW);
}