FastLED 3.9.15
Loading...
Searching...
No Matches

◆ loop()

void loop ( )

Definition at line 109 of file Noise.ino.

109 {
110#ifdef USE_HUE
111 static uint8_t ihue=0;
112#endif
113 fillnoise8();
114 for(int i = 0; i < kMatrixWidth; i++) {
115 for(int j = 0; j < kMatrixHeight; j++) {
116 // We use the value at the (i,j) coordinate in the noise
117 // array for our brightness, and the flipped value from (j,i)
118 // for our pixel's hue.
119#ifdef USE_HUE
120 // Slowly cycling base hue plus noise-derived offset
121 leds[XY(i,j)] = CHSV(ihue + (noise[j][i]>>2),255,noise[i][j]);
122#else
123 leds[XY(i,j)] = CHSV(noise[j][i],255,noise[i][j]);
124#endif
125 }
126 }
127#ifdef USE_HUE
128 ihue+=1;
129#endif
130
131 FastLED.show();
132 // delay(10);
133}
fl::CRGB leds[NUM_LEDS]
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
void fillnoise8()
Definition Noise.ino:97
#define kMatrixHeight
#define kMatrixWidth
FL_OPTIMIZATION_LEVEL_O3_BEGIN fl::u16 XY(fl::u8 x, fl::u8 y) FL_LINK_WEAK
Definition blur.cpp.hpp:35
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: