18#define TIME_FACTOR_HUE 60
19#define TIME_FACTOR_SAT 100
20#define TIME_FACTOR_VAL 100
30 uint32_t ms = millis();
32 for(
int i = 0; i < NUM_LEDS; i++) {
34 uint8_t hue =
inoise16(ms * TIME_FACTOR_HUE, i * 1000, 0) >> 8;
35 uint8_t sat =
inoise16(ms * TIME_FACTOR_SAT, i * 2000, 1000) >> 8;
36 uint8_t val =
inoise16(ms * TIME_FACTOR_VAL, i * 3000, 2000) >> 8;
39 sat = map(sat, 0, 255, 30, 255);
40 val = map(val, 0, 255, 100, 255);
42 leds[i] =
CHSV(hue, sat, val);
CFastLED FastLED
Global LED strip management instance.
central include file for FastLED, defines the CFastLED class/object
void setBrightness(uint8_t scale)
Set the global brightness scaling.
void show(uint8_t scale)
Update all our controllers with the current led colors, using the passed in brightness.
static CLEDController & addLeds(CLEDController *pLed, struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a CLEDController instance to the world.
@ GRB
Green, Red, Blue (0102)
uint16_t inoise16(uint32_t x, uint32_t y, uint32_t z)
16-bit, fixed point implementation of Perlin's noise.
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Representation of an RGB pixel (Red, Green, Blue)