void setup() {
pinMode(2, INPUT);
pinMode(3, INPUT);
pinMode(5, OUTPUT);
}
void loop() {
if (digitalRead(2) == 1) {
digitalWrite(5, 1);
delay(100);
}
else if (digitalRead(3) == 1) {
digitalWrite(5, 0);
delay(100);
}
}
void setup() {
pinMode(2, INPUT);
pinMode(3, INPUT);
pinMode(5, OUTPUT);
}
void loop() {
if (digitalRead(2) == 1) {
digitalWrite(5, 1);
delay(100);
}
else if (digitalRead(3) == 1) {
digitalWrite(5, 0);
delay(100);
}
}