8#include "fx/2d/noisepalette.hpp"
9#include "fx/2d/animartrix.hpp"
10#include "fx/fx_engine.h"
11#include "fx/storage/sd.h"
16#define LED_TYPE WS2811
17#define COLOR_ORDER GRB
19#define MATRIX_WIDTH 22
20#define MATRIX_HEIGHT 22
22#define NUM_LEDS (MATRIX_WIDTH * MATRIX_HEIGHT)
25#define IS_SERPINTINE false
27#define IS_SERPINTINE true
31Slider SCALE(
"SCALE", 20, 20, 100);
32Slider SPEED(
"SPEED", 30, 20, 100);
35XYMap xyMap(MATRIX_WIDTH, MATRIX_HEIGHT, IS_SERPINTINE);
45 .setScreenMap(MATRIX_WIDTH, MATRIX_HEIGHT);
47 noisePalette.lazyInit();
48 noisePalette.setPalettePreset(2);
49 fxEngine.
addFx(noisePalette);
50 fxEngine.
addFx(animartrix);
54 noisePalette.setSpeed(SPEED);
55 noisePalette.setScale(SCALE);
61 fxEngine.
draw(millis(), leds);
CFastLED FastLED
Global LED strip management instance.
central include file for FastLED, defines the CFastLED class/object
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.
Manages and renders multiple visual effects (Fx) for LED strips.
int addFx(FxRef effect)
Adds a new effect to the engine.
bool nextFx(uint16_t transition_ms=500)
Transitions to the next effect in the sequence.
bool draw(uint32_t now, CRGB *outputBuffer)
Renders the current effect or transition to the output buffer.
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
#define EVERY_N_SECONDS(N)
Checks whether to execute a block of code every N seconds.
Representation of an RGB pixel (Red, Green, Blue)