int TASTER_EINS = 5; // Taste 1 int TASTER_ZWEI = 4; // Taste 2 int TASTER_DREI = 7; // Taste 3 int TASTER_VIER = 6; // Taste 4 void setup() { Serial.begin(9600); // Vorwiderstand aktivieren pinMode(TASTER_EINS, INPUT_PULLUP); pinMode(TASTER_ZWEI, INPUT_PULLUP); pinMode(TASTER_DREI, INPUT_PULLUP); pinMode(TASTER_VIER, INPUT_PULLUP); } void loop() { if (digitalRead(TASTER_EINS) == LOW) { delay(100); Serial.println("Taste 1 an Pin " + String(TASTER_EINS)); } if (digitalRead(TASTER_ZWEI) == LOW) { delay(100); Serial.println("Taste 2 an Pin " + String(TASTER_ZWEI)); } if (digitalRead(TASTER_DREI) == LOW) { delay(100); Serial.println("Taste 3 an Pin " + String(TASTER_DREI)); } if (digitalRead(TASTER_VIER) == LOW) { delay(100); Serial.println("Taste 4 an Pin " + String(TASTER_VIER)); } }