int button1 = 2;
int button2 = 15;
void setup() {
// put your setup code here, to run once:
pinMode(button1, INPUT);
pinMode(button2, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int button_1_status = digitalRead(button1);
int button_2_status = digitalRead(button2);
if(button_1_status == LOW)
{
Serial.println("Button 1 is pressed");
delay(1000);
}
if(button_2_status == HIGH)
{
Serial.println("Button 2 is pressed");
delay(1000);
}
}