#include "FastLED.h"
#define NUM_LEDS 100
#define LED_TYPE WS2811
#define COLOR_ORDER GRB
#define DATA_PIN 3
#define VOLTS 12
#define MAX_MA 4000
#define TWINKLE_SPEED 4
#define TWINKLE_DENSITY 5
#define SECONDS_PER_PALETTE 30
#define AUTO_SELECT_BACKGROUND_COLOR 0
#define COOL_LIKE_INCANDESCENT 1
delay(3000);
}
{
}
}
}
{
if( bglight > 64) {
} else if( bglight > 16) {
} else {
}
} else {
}
PRNG16 = (
uint16_t)(PRNG16 * 2053) + 1384;
PRNG16 = (
uint16_t)(PRNG16 * 2053) + 1384;
uint8_t myspeedmultiplierQ5_3 = ((((PRNG16 & 0xFF)>>4) + (PRNG16 & 0x0F)) & 0x0F) + 0x08;
uint32_t myclock30 = (
uint32_t)((clock32 * myspeedmultiplierQ5_3) >> 3) + myclockoffset16;
int16_t deltabright = cbright - backgroundBrightness;
if( deltabright >= 32 || (!bg)) {
pixel = c;
} else if( deltabright > 0 ) {
pixel =
blend( bg, c, deltabright * 8);
} else {
pixel = bg;
}
}
}
{
uint16_t slowcycle16 = (ticks >> 8) + salt;
slowcycle16 += sin8( slowcycle16);
slowcycle16 = (slowcycle16 * 2053) + 1384;
uint8_t slowcycle8 = (slowcycle16 & 0xFF) + (slowcycle16 >> 8);
}
if( bright > 0) {
}
} else {
}
return c;
}
{
if( i < 86) {
return i * 3;
} else {
i -= 86;
return 255 - (i + (i/2));
}
}
{
if( phase < 128) return;
uint8_t cooling = (phase - 128) >> 4;
c.g = qsub8( c.g, cooling);
c.b = qsub8( c.b, cooling * 2);
}
#define Holly_Green 0x00580c
#define Holly_Red 0xB00402
};
#define HALFFAIRY ((CRGB::FairyLight & 0xFEFEFE) / 2)
#define QUARTERFAIRY ((CRGB::FairyLight & 0xFCFCFC) / 4)
{ 0x304048, 0x304048, 0x304048, 0x304048,
0x304048, 0x304048, 0x304048, 0x304048,
0x304048, 0x304048, 0x304048, 0x304048,
0x304048, 0x304048, 0x304048, 0xE0F0FF };
#define C9_Red 0xB80400
#define C9_Orange 0x902C02
#define C9_Green 0x046002
#define C9_Blue 0x070758
#define C9_White 0x606820
};
#define Ice_Blue1 0x0C1040
#define Ice_Blue2 0x182080
#define Ice_Blue3 0x5080C0
{
};
};
{
whichPalette = addmod8( whichPalette, 1, numberOfPalettes);
}
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
void coolLikeIncandescent(CRGB &c, uint8_t phase)
CRGBPalette16 gTargetPalette
void chooseNextColorPalette(CRGBPalette16 &pal)
const TProgmemRGBPalette16 Ice_p
uint8_t attackDecayWave8(uint8_t i)
const TProgmemRGBPalette16 RedWhite_p
const TProgmemRGBPalette16 FairyLight_p
const TProgmemRGBPalette16 RedGreenWhite_p
void drawTwinkles(CRGBSet &L)
const TProgmemRGBPalette16 * ActivePaletteList[]
const TProgmemRGBPalette16 BlueWhite_p
CRGBPalette16 gCurrentPalette
const TProgmemRGBPalette16 Holly_p
const TProgmemRGBPalette16 RetroC9_p
const TProgmemRGBPalette16 Snow_p
CRGB computeOneTwinkle(uint32_t ms, uint8_t salt)
A version of CPixelView<CRGB> with an included array of CRGB LEDs.
CRGB ColorFromPalette(const CRGBPalette16 &pal, fl::u8 index, fl::u8 brightness, TBlendType blendType)
CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2)
void nblendPaletteTowardPalette(CRGBPalette16 ¤t, CRGBPalette16 &target, fl::u8 maxChanges)
fl::u32 TProgmemRGBPalette16[16]
CRGBPalette16 entries stored in PROGMEM memory.
#define FL_PROGMEM
PROGMEM keyword for storage.
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
const TProgmemRGBPalette16 PartyColors_p
HSV color ramp: blue, purple, pink, red, orange, yellow (and back).
const TProgmemRGBPalette16 RainbowColors_p
HSV Rainbow.
#define EVERY_N_MILLISECONDS(N)
Alias for EVERY_N_MILLIS.
#define EVERY_N_SECONDS(N)
Checks whether to execute a block of code every N seconds.
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.
CPixelView< CRGB > CRGBSet
CPixelView specialized for CRGB pixel arrays - the most commonly used pixel view type.
FASTLED_FORCE_INLINE u8 getAverageLight() const FL_NOEXCEPT
Get the average of the R, G, and B values.
@ FairyLight
<div style='background:#FFE42D;width:4em;height:4em;'></div>
@ Green
<div style='background:#008000;width:4em;height:4em;'></div>
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
@ Blue
<div style='background:#0000FF;width:4em;height:4em;'></div>
@ Gray
<div style='background:#808080;width:4em;height:4em;'></div>
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
FASTLED_FORCE_INLINE CRGB & nscale8_video(u8 scaledown) FL_NOEXCEPT
Scale down a RGB to N/256ths of it's current brightness using "video" dimming rules.
#define AUTO_SELECT_BACKGROUND_COLOR
#define COOL_LIKE_INCANDESCENT
#define SECONDS_PER_PALETTE