int Pushbutton1=2; //Pin untuk tombol
int lampu1=4; //Pin untuk Lampu 4, 5, 6
int lampu2=5;
int lampu3=6;
void setup() {
// put your setup code here, to run once:
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(2, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(2)==HIGH){ //Indikadi tombol Aktif&Mati
digitalWrite(4, HIGH); //Lampu Hidup
delay(200); //Lampu meredup
digitalWrite(4, LOW); //Lampu Mati
digitalWrite(5, HIGH); //Lampu Hidup
delay(100); //Lampu meredup
digitalWrite(5, LOW); //Lampu Mati
digitalWrite(6, HIGH); //Lampu Hidup
delay(100); //Lampu meredup
digitalWrite(6, LOW); //Lampu Mati
}
}