bool button, statusLed = 0;
void setup() {
pinMode(25, INPUT_PULLUP);
pinMode(26, OUTPUT);
Serial.begin(9600);
}
void loop() {
button = digitalRead(25);
if (button == 0) {
if (statusLed == 0) {
statusLed = 1;
}
else {
statusLed = 0;
}
}
digitalWrite(26, statusLed);
Serial.println(button);
delay(500);
}