#define led 21
#define b1 14
#define b2 13
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(led, OUTPUT);
pinMode(b1, INPUT_PULLUP);
pinMode(b2, INPUT_PULLUP);
}
// LED active high
// two button (both are pull up ) --> pin + GND
void loop() {
if(digitalRead(b1)==LOW){
digitalWrite(led, HIGH);
}else if (digitalRead(b2)==LOW){
digitalWrite(led, LOW);
}
// put your main code here, to run repeatedly:
// this speeds up the simulation
}