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)
79UIDescription 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");
97 Serial.println(
"Sketch setup");
100 .setScreenMap(
xyMap);
101 Serial.println(
"FastLED setup done");
107 Serial.println(
"Sketch setup done");
119 static int frame = 0;
130 static int lastFxIndex = -1;
131 if (
fxIndex.value() != lastFxIndex) {
CFastLED FastLED
Global LED strip management instance.
central include file for FastLED, defines the CFastLED class/object
UIDescription description("This Fire demo wraps around the cylinder. It uses Perlin noise to create a fire effect.")
XYMap xyMap(HEIGHT, WIDTH, SERPENTINE)
UISlider brightness("Brightness", 255, 0, 255, 1)
UISlider timeSpeed("Time Speed", 1, -10, 10,.1)
FxEngine fxEngine(NUM_LEDS)
Animartrix animartrix(xyMap, FIRST_ANIMATION)
UINumberField fxIndex("Animartrix - index", 0, 0, NUM_ANIMATIONS - 1)
UISlider scale("Scale", 4,.1, 4,.1)
NoisePalette noisePalette(xyMap)
Manages and renders multiple visual effects (Fx) for LED strips.
static XYMap constructRectangularGrid(uint16_t width, uint16_t height, uint16_t offset=0)
@ 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)
UISlider speed("Noise - Speed", 15, 1, 50)
UICheckbox isOff("Off", false)
UITitle title("FastLED Wasm Demo")
Animartrix animartrix(xyMap, POLAR_WAVES)