#include <FastLED.h>
#define DATA_PIN 5
#define NUM_LEDS 16
#define BRIGHTNESS 255 /* Control the brightness of your leds */
#define SATURATION 255 /* Control the saturation of your leds */
CRGB leds[NUM_LEDS];
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello!");
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS); // GRB ordering is assumed
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
for (int j = 0; j < 255; j++) {
for (int i = 0; i < NUM_LEDS; i++) {
leds[i] = CHSV(i - (j * 8), SATURATION, BRIGHTNESS); /* The higher the value 4 the less fade there is and vice versa */
FastLED.show();
delay(20); /* Change this to your hearts desire, the lower the value the faster your colors move (and vice versa) */
}
}
}