//Fab Academy 2024 - Fab Lab León //Button //FabriXiao //XIAO RP2040 const int button_PIN= 26; const int led_PIN = 3; int value_button = 0; void setup() { // We assign the input and the output pinMode(button_PIN, INPUT_PULLUP); pinMode(led_PIN, OUTPUT); } void loop() { // We read the value of the button value_button = digitalRead(button_PIN); // We turn the LED on or off as appropriate if (value_button == LOW) { digitalWrite(led_PIN, HIGH); // We turn on Led } else { digitalWrite(led_PIN, LOW); // We turn off Led } }