const int Red_Light =25;
const int Yellow_Light =26;
const int Green_Light =27;
const long Waktu_Brenti = 20000;
const long Waktu_Beralih = 3000;
void setup() {
// put your setup code here, to run once:
pinMode(Red_Light, OUTPUT);
pinMode(Yellow_Light, OUTPUT);
pinMode(Green_Light, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(Red_Light, HIGH);
digitalWrite(Yellow_Light, LOW);
digitalWrite(Green_Light, LOW);
delay(Waktu_Brenti); // this speeds up the simulation
digitalWrite(Red_Light, LOW);
digitalWrite(Yellow_Light, HIGH);
digitalWrite(Green_Light, LOW);
delay(Waktu_Beralih); // this speeds up the simulation
digitalWrite(Red_Light, LOW);
digitalWrite(Yellow_Light, LOW);
digitalWrite(Green_Light, HIGH);
delay(Waktu_Brenti); // this speeds up the simulation
}