13#define FRAMES_PER_SECOND 60
15bool gReverseDirection =
false;
79 static uint8_t heat[NUM_LEDS];
82 for(
int i = 0; i < NUM_LEDS; i++) {
83 heat[i] =
qsub8( heat[i],
random8(0, ((COOLING * 10) / NUM_LEDS) + 2));
87 for(
int k= NUM_LEDS - 1; k >= 2; k--) {
88 heat[k] = (heat[k - 1] + heat[k - 2] + heat[k - 2] ) / 3;
98 for(
int j = 0; j < NUM_LEDS; j++) {
101 if( gReverseDirection ) {
102 pixelnumber = (NUM_LEDS-1) - j;
106 leds[pixelnumber] = color;
CFastLED FastLED
Global LED strip management instance.
central include file for FastLED, defines the CFastLED class/object
void delay(unsigned long ms)
Delay for the given number of milliseconds.
void setBrightness(uint8_t scale)
Set the global brightness scaling.
void show(uint8_t scale)
Update all our controllers with the current led colors, using the passed in brightness.
static CLEDController & addLeds(CLEDController *pLed, struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a CLEDController instance to the world.
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
CRGB HeatColor(uint8_t temperature)
Approximates a "black body radiation" spectrum for a given "heat" level.
LIB8STATIC_ALWAYS_INLINE uint8_t qadd8(uint8_t i, uint8_t j)
Add one byte to another, saturating at 0xFF.
LIB8STATIC_ALWAYS_INLINE uint8_t qsub8(uint8_t i, uint8_t j)
Subtract one byte from another, saturating at 0x00.
LIB8STATIC uint8_t random8()
Generate an 8-bit random number.
Representation of an RGB pixel (Red, Green, Blue)