FastLED 3.10.8
Loading...
Searching...
No Matches

◆ loop()

void loop ( )

Definition at line 115 of file Noise.ino.

115 {
116#ifdef USE_HUE
117 static uint8_t ihue=0;
118#endif
119 fillnoise8();
120 for(int i = 0; i < kMatrixWidth; i++) {
121 for(int j = 0; j < kMatrixHeight; j++) {
122 // We use the value at the (i,j) coordinate in the noise
123 // array for our brightness, and the flipped value from (j,i)
124 // for our pixel's hue.
125#ifdef USE_HUE
126 // Slowly cycling base hue plus noise-derived offset
127 leds[XY(i,j)] = CHSV(ihue + (noise[j][i]>>2),255,noise[i][j]);
128#else
129 leds[XY(i,j)] = CHSV(noise[j][i],255,noise[i][j]);
130#endif
131 }
132 }
133#ifdef USE_HUE
134 ihue+=1;
135#endif
136
137 FastLED.show();
138 // delay(10);
139}
CRGB leds[1]
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
uint8_t noise[NUM_LAYERS][WIDTH][HEIGHT]
Definition Fire2023.h:97
uint8_t XY(uint8_t x, uint8_t y)
Definition Fire2023.h:219
void fillnoise8()
Definition Noise.ino:103
#define kMatrixHeight
#define kMatrixWidth
fl::hsv8 CHSV
Definition chsv.h:11
unsigned char uint8_t
Definition s16x16x4.h:209

References FastLED, fillnoise8(), kMatrixHeight, kMatrixWidth, leds, noise, and XY().

+ Here is the call graph for this function: