void setup() {
Serial.begin(9600);
pinMode(2, INPUT_PULLUP);
pinMode(3, INPUT_PULLUP);
pinMode(4, INPUT_PULLUP);
pinMode(5, INPUT_PULLUP);
pinMode(6, INPUT_PULLUP);
}
void loop() {
if (digitalRead(2) == 0) {
Serial.println("UP");
delay(100);
}
else if (digitalRead(3) == 0) {
Serial.println("DWN");
delay(100);
}
else if (digitalRead(4) == 0) {
Serial.println("LRT");
delay(100);
}
else if (digitalRead(5) == 0) {
Serial.println("RHT");
delay(100);
}
else if (digitalRead(6) == 0) {
Serial.println("MID");
delay(100);
}
else if (digitalRead(7) == 0) {
Serial.println("SET");
delay(100);
}
else if (digitalRead(7) == 0) {
Serial.println("RST");
delay(100);
}
else {
}
}