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

◆ loop()

void loop ( )

Definition at line 146 of file Fire2012WithPalette.ino.

147{
148 // Add entropy to random number generator; we use a lot of it.
150
151 // Fourth, the most sophisticated: this one sets up a new palette every
152 // time through the loop, based on a hue that changes every time.
153 // The palette is a gradient from black, to a dark color based on the hue,
154 // to a light color based on the hue, to white.
155 //
156 // static uint8_t hue = 0;
157 // hue++;
158 // CRGB darkcolor = CHSV(hue,255,192); // pure hue, three-quarters brightness
159 // CRGB lightcolor = CHSV(hue,128,255); // half 'whitened', full brightness
160 // gPal = CRGBPalette16( CRGB::Black, darkcolor, lightcolor, CRGB::White);
161
162
163 Fire2012WithPalette(); // run simulation frame, using palette colors
164
165 FastLED.show(); // display this frame
166 FastLED.delay(1000 / FRAMES_PER_SECOND);
167}
#define FRAMES_PER_SECOND
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:74
void Fire2012WithPalette()
LIB8STATIC void random16_add_entropy(uint16_t entropy)
Add entropy into the random number generator.
Definition random8.h:103
LIB8STATIC uint16_t random16()
Generate a 16-bit random number.
Definition random8.h:56

References FastLED, Fire2012WithPalette(), FRAMES_PER_SECOND, random16(), and random16_add_entropy().

+ Here is the call graph for this function: