int button1 = 15;
int button2 = 2 ;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(button1, INPUT);
pinMode(button2, INPUT);
}
// Active LOW
void loop() {
int BUTTON1 = digitalRead(button1);
int BUTTON2 = digitalRead(button2);
if (BUTTON1 == LOW){
Serial.println("Push Button 1 is Pressed");
delay(200);
}
//Active HIGH
if (BUTTON2 == HIGH){
Serial.println("Push Button 2 is Pressed");
delay(200);
}
}