// EXAMEN PRÁCTICO: BOTÓN ANTI-PÁNICO
const int pinBoton = 2;
const int pinLED = 13;
void setup() {
pinMode(pinBoton, INPUT_PULLUP);
pinMode(pinLED, OUTPUT);
}
void loop() {
int estadoBoton = digitalRead(pinBoton);
if (estadoBoton == LOW) {
digitalWrite(pinLED, LOW);
} else {
digitalWrite(pinLED, HIGH);
}
}