#include < FastLED.h >
#define LED_PIN 4 // Pin donde está conectada la tira LED
#define NUM_LEDS 30 // Número de LEDs en la tira
#define BUTTON_PIN 15 // Pin donde está conectado el botón de arcade
CRGB leds[NUM_LEDS]; // Arreglo para los LEDs
int currentLed = 0; // Contador para el LED actual
bool buttonPressed = false; // Estado del botón
bool isBlinking = false; // Estado de parpadeo
void setup() {
Serial.begin(115200);
pinMode(BUTTON_PIN, INPUT_PULLUP); // Configurar el botón como entrada con resistencia pull-up
FastLED.addLeds<WS2811, LED_PIN, GRB>(leds, NUM_LEDS);
FastLED.clear(); // Limpiar los LEDs al inicio
FastLED.show();
}
void loop() {
// Leer el estado del botón (LOW cuando está presionado)
if (digitalRead(BUTTON_PIN) == LOW) {