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

◆ loop()

void loop ( )

Definition at line 147 of file Fire2012WithPalette.ino.

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

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

+ Here is the call graph for this function: