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

◆ loop()

void loop ( )

Definition at line 106 of file Noise.ino.

106 {
107 static uint8_t ihue=0;
108 fillnoise8();
109 for(int i = 0; i < kMatrixWidth; i++) {
110 for(int j = 0; j < kMatrixHeight; j++) {
111 // We use the value at the (i,j) coordinate in the noise
112 // array for our brightness, and the flipped value from (j,i)
113 // for our pixel's hue.
114 leds[XY(i,j)] = CHSV(noise[j][i],255,noise[i][j]);
115
116 // You can also explore other ways to constrain the hue used, like below
117 // leds[XY(i,j)] = CHSV(ihue + (noise[j][i]>>2),255,noise[i][j]);
118 }
119 }
120 ihue+=1;
121
122 FastLED.show();
123 // delay(10);
124}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:58
uint8_t noise[NUM_LAYERS][WIDTH][HEIGHT]
Definition Fire2023.ino:86
void fillnoise8()
Definition Noise.ino:94
#define kMatrixHeight
#define kMatrixWidth
uint16_t XY(uint8_t x, uint8_t y)
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Definition chsv.h:16

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

+ Here is the call graph for this function: