const int pinButton = 0;
const int pinButton1 = 1;
const int pinButton2 = 2;
const int pinButton3 = 3;
const int numLED = 4;
const int pinLED[numLED] = {8,9,10,11};
void setup() {
pinMode(pinButton, INPUT);
pinMode(pinButton1, INPUT);
pinMode(pinButton2, INPUT);
pinMode(pinButton3, INPUT);
for(int i=0; i<4; i++)
pinMode(pinLED[i], OUTPUT);
digitalWrite(pinButton, HIGH);
digitalWrite(pinButton1, HIGH);
digitalWrite(pinButton2, HIGH);
digitalWrite(pinButton3, HIGH);
}
void loop() {
if(digitalRead(pinButton)== LOW)
for(int i=0; i<4; i++){
digitalWrite(pinLED[i], HIGH);
}
if(digitalRead(pinButton)== HIGH)
for(int i=0; i<4; i++){
digitalWrite(pinLED[i], LOW);
}
if(digitalRead(pinButton1)== LOW)
for(int i=0; i<4; i++){
digitalWrite(pinLED[i], HIGH);
}
if(digitalRead(pinButton1)== HIGH)
for(int i=0; i<4; i++){
digitalWrite(pinLED[i], LOW);
}
if(digitalRead(pinButton2)== LOW)
for(int i=0; i<4; i++){
digitalWrite(pinLED[i], HIGH);
}
if(digitalRead(pinButton2)== HIGH)
for(int i=0; i<4; i++){
digitalWrite(pinLED[i], LOW);
}
if(digitalRead(pinButton3)== LOW)
for(int i=0; i<4; i++){
digitalWrite(pinLED[i], HIGH);
}
if(digitalRead(pinButton3)== HIGH)
for(int i=0; i<4; i++){
digitalWrite(pinLED[i], LOW);
}
}