int button_1 = 27;
int button_2 = 26;
void setup(){
Serial.begin(9600);
// initialize the digital pins as inputs
pinMode(button_1, INPUT);
pinMode(button_2, INPUT);
}
// active low
// active high
void loop(){
// read the state of the pushbutton values:
int buttonState1 = digitalRead(button_1);
int buttonState2 = digitalRead(button_2);
// active low
if (buttonState1 == LOW){
Serial.println("Push Button 1 is Pressed");
delay(200); // debounce
}
// active high
if (buttonState2 == HIGH){
Serial.println("Push Button 2 is Pressed");
delay(200); // debounce
}
}