const int tombol= 3;
const int numLED = 4;
const int lampu[numLED]={8,9,10,11};
void setup() {
pinMode(tombol, INPUT);
for(int i=0;i<4;i++)
pinMode(lampu[i], OUTPUT);
digitalWrite(tombol, HIGH);
}
void loop () {
if (digitalRead(tombol)==LOW)
for(int i=0;i<4;i++){
digitalWrite(lampu[i], HIGH);
}
if (digitalRead(tombol)==HIGH)
for(int i=0;i<4;i++){
digitalWrite(lampu[i], LOW);
}
}