29#define COLOR_ORDER GRB
31#define MATRIX_WIDTH 100
32#define MATRIX_HEIGHT 100
33#define GRID_SERPENTINE false
35#define NUM_LEDS (MATRIX_WIDTH * MATRIX_HEIGHT)
83UIDescription description(
"This example combines two features of FastLED to produce a remarkable range of effects from a relatively small amount of code. This example combines FastLED's color palette lookup functions with FastLED's Perlin noise generator, and the combination is extremely powerful");
106 Serial.begin(115200);
107 Serial.println(
"Sketch setup");
110 .setScreenMap(
xyMap);
111 Serial.println(
"FastLED setup done");
117 Serial.println(
"Sketch setup done");
121 uint32_t now = millis();
130 static int frame = 0;
145 static int lastFxIndex = -1;
146 if (
fxIndex.value() != lastFxIndex) {
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
central include file for FastLED, defines the CFastLED class/object
FxEngine fxEngine(NUM_LEDS)
UISlider brightness("Brightness", 1, 0, 1)
static XYMap constructRectangularGrid(uint16_t width, uint16_t height, uint16_t offset=0)
Manages and renders multiple visual effects (Fx) for LED strips.
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
#define EVERY_N_MILLISECONDS_DYNAMIC(PERIOD_FUNC)
Checks whether to execute a block of code every N milliseconds, where N is determined dynamically.
Implements a simple red square effect for 2D LED grids.
Demonstrates how to mix noise generation with color palettes on a 2D LED matrix.
Representation of an RGB pixel (Red, Green, Blue)
UISlider changePalletTime("Noise - Time until next random Palette", 5, 1, 100)
UIButton changePalette("Noise - Next Palette")
UISlider timeSpeed("Time Speed", 1, -10, 10,.1)
UICheckbox changePallete("Noise - Auto Palette", true)
FxEngine fxEngine(NUM_LEDS)
UIButton changeFx("Switch between Noise & Animartrix")
UINumberField fxIndex("Animartrix - index", 0, 0, NUM_ANIMATIONS)
UISlider scale("Noise - Scale", 20, 1, 100)
UISlider brightness("Brightness", 255, 0, 255)
NoisePalette noisePalette
UISlider speed("Noise - Speed", 15, 1, 50)
UICheckbox isOff("Off", false)
UITitle title("FastLED Wasm Demo")
Animartrix animartrix(xyMap, POLAR_WAVES)
UIDescription description("Advanced layered and blended wave effects.")