int pinLeds[] = {11, 10, 9, 8};
int pinInput[] = {6, 5, 4, 3};
void setup() {
// put your setup code here, to run once:
for(int i = 0; i < 4; i++){
pinMode(pinLeds[i], OUTPUT);
pinMode(pinInput[i], INPUT_PULLUP);
}
}
void loop() {
// put your main code here, to run repeatedly:
for(int i = 0; i < 4; i++){
int val = digitalRead(pinInput[i]);
if(val == 0){
digitalWrite(pinLeds[i], 1);
}
else{
digitalWrite(pinLeds[i], 0);
}
}
}