const int led1 = 1;
const int led2 = 2;
const int led3 = 3;
const int led4 = 4;
const int led5 = 5;
const int button1 = 6;
const int button2 = 7;
const int button3 = 8;
const int button4 = 9;
const int button5 = 10;
void setup() {
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
pinMode(led5, OUTPUT);
pinMode(button1, INPUT_PULLUP);
pinMode(button2, INPUT_PULLUP);
pinMode(button3, INPUT_PULLUP);
pinMode(button4, INPUT_PULLUP);
pinMode(button5, INPUT_PULLUP);
}
void loop() {
if (digitalRead(6)) {
digitalWrite(led1, LOW);
}
else {
digitalWrite(led1, HIGH);
}
if (digitalRead(7)) {
digitalWrite(led2, LOW);
}
else {
digitalWrite(led2, HIGH);
}
if (digitalRead(8)) {
digitalWrite(led3, LOW);
}
else {
digitalWrite(led3, HIGH);
}
if (digitalRead(9)) {
digitalWrite(led4, LOW);
}
else {
digitalWrite(led4, HIGH);
}
if (digitalRead(10)) {
digitalWrite(led5, LOW);
}
else {
digitalWrite(led5, HIGH);
}
}