#define buttonAPin 13
#define buttonBPin 15
#define led 21
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(buttonAPin, INPUT_PULLUP);
pinMode(buttonBPin, INPUT_PULLUP);
pinMode(led, OUTPUT);
}
int status = 0;
void loop() {
// put your main code here, to run repeatedly:
if (!digitalRead(buttonAPin)) {
status = 1;
} else if (!digitalRead(buttonBPin)) {
status = 0;
}
digitalWrite(led, status);
}