const int buttonPin1 = 3; const int buttonPin2 = 4; int buttonState1 = 0; int buttonState2 = 0; void setup() { // put your setup code here, to run once: pinMode(buttonPin1, INPUT); pinMode(buttonPin2, INPUT); Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: buttonState1 = digitalRead(buttonPin1); buttonState2 = digitalRead(buttonPin2); if (buttonState1 == HIGH) { Serial.println("DI3:ON"); }else { Serial.println("DI3:OFF");} if (buttonState2 == HIGH) { Serial.println("DI4:ON"); }else { Serial.println("DI4:OFF");} delay(500); }