13#if !SKETCH_HAS_LARGE_MEMORY
24#define LED_TYPE WS2811
25#define COLOR_ORDER GRB
66#define NUM_LEDS (kMatrixWidth * kMatrixHeight)
69#define MAX_DIMENSION ((kMatrixWidth>kMatrixHeight) ? kMatrixWidth : kMatrixHeight)
112void SetupRandomPalette();
115void ChangePaletteAndSettingsPeriodically();
116void mapNoiseToLEDsUsingPalette();
152 dataSmoothing = 200 - (
speed * 4);
158 int ioffset =
scale * i;
162 int joffset =
scale * j;
171 data = qsub8(data, 16);
172 data = qadd8(data, scale8(data, 39));
175 if( dataSmoothing ) {
180 uint8_t newdata = scale8(olddata, dataSmoothing) +
181 scale8(data, 256 - dataSmoothing);
202void mapNoiseToLEDsUsingPalette()
231 bri = dim8_raw( bri * 2);
253 ChangePaletteAndSettingsPeriodically();
260 mapNoiseToLEDsUsingPalette();
286#define HOLD_PALETTES_X_TIMES_AS_LONG 1
289void ChangePaletteAndSettingsPeriodically()
293 uint8_t secondHand = ((
millis() / 1000) / HOLD_PALETTES_X_TIMES_AS_LONG) % 60;
294 static uint8_t lastSecond = 99;
297 if( lastSecond != secondHand) {
298 lastSecond = secondHand;
325void SetupRandomPalette()
370 green, green, black, black,
371 purple, purple, black, black,
372 green, green, black, black,
373 purple, purple, black, black );
CRGBPalette16 currentPalette
void SetupPurpleAndGreenPalette()
void SetupBlackAndWhiteStripedPalette()
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
uint8_t noise[NUM_LAYERS][WIDTH][HEIGHT]
fl::UISlider scale("Scale", 4,.1, 4,.1)
#define kMatrixSerpentineLayout
FL_OPTIMIZATION_LEVEL_O3_BEGIN fl::u16 XY(fl::u8 x, fl::u8 y) FL_LINK_WEAK
@ HUE_PURPLE
Purple (270°)
CRGB ColorFromPalette(const CRGBPalette16 &pal, fl::u8 index, fl::u8 brightness, TBlendType blendType)
void fill_solid(CRGB *targetArray, int numToFill, const CRGB &color) FL_NOEXCEPT
Fill a range of LEDs with a solid color.
fl::u8 inoise8(fl::u16 x, fl::u16 y, fl::u16 z)
const TProgmemRGBPalette16 RainbowStripeColors_p
HSV Rainbow colors with alternatating stripes of black.
const TProgmemRGBPalette16 OceanColors_p
Ocean colors, blues and whites.
const TProgmemRGBPalette16 CloudColors_p
Cloudy color palette.
const TProgmemRGBPalette16 ForestColors_p
Forest colors, greens.
const TProgmemRGBPalette16 LavaColors_p
Lava color palette.
const TProgmemRGBPalette16 PartyColors_p
HSV color ramp: blue, purple, pink, red, orange, yellow (and back).
const TProgmemRGBPalette16 RainbowColors_p
HSV Rainbow.
LIB8STATIC fl::u16 random16() FL_NOEXCEPT
Generate a 16-bit random number.
LIB8STATIC fl::u8 random8() FL_NOEXCEPT
Generate an 8-bit random number.
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.
void delay(u32 ms, bool run_async=true) FL_NOEXCEPT
Public delay wrapper that keeps bare Arduino delay() preferred after using fl::delay; while still all...
@ White
<div style='background:#FFFFFF;width:4em;height:4em;'></div>
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>