#include "FastLED.h"
#define NUM_LEDS 8 // número de píxeles
#define PIN 6 // puerto de conexión ws2811b
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds <WS2812, PIN, GRB>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
FastLED.setBrightness(250);
}
void loop() {
leds[0] = CHSV(17, 0, 251);
FastLED.show();
delay(500);
leds[1] = CHSV(17, 0, 251);
FastLED.show();
delay(500);
leds[2] = CHSV(17, 0, 251);
FastLED.show();
delay(500);
leds[3] = CHSV(255, 242, 0);
FastLED.show();
delay(500);
leds[4] = CHSV(17, 0, 251);
FastLED.show();
delay(500);
leds[5] = CHSV(255, 242, 0);
FastLED.show();
delay(500);
leds[6] = CHSV(17, 0, 251);
FastLED.show();
delay(500);
leds[7] = CHSV(255, 242, 0);
FastLED.show();
delay(500);
leds[0] = CRGB(38, 251, 0);
FastLED.show();
delay(500);
leds[1] = CRGB(38, 251, 0);
FastLED.show();
delay(500);
leds[2] = CRGB(225, 255, 0);
FastLED.show();
delay(500);
leds[3] = CRGB(225, 255, 0);
FastLED.show();
delay(500);
leds[4] = CRGB(251, 92, 0);
FastLED.show();
delay(500);
leds[5] = CRGB(251, 92, 0);
FastLED.show();
delay(500);
leds[6] = CRGB(251, 0, 0);
FastLED.show();
delay(500);
leds[7] = CRGB(251, 0, 0);
FastLED.show();
delay(500);
}