FastLED 3.9.7
|
Demonstrates how to use the FxEngine to switch between different effects on a 2D LED matrix.
This example is compatible with the new FastLED wasm compiler. Install it by running pip install fastled
then running fastled
in this sketch directory.
Definition in file FxEngine.ino.
#include <FastLED.h>
#include "fx/2d/noisepalette.h"
#include "fx/2d/animartrix.hpp"
#include "fx/fx_engine.h"
#include "fl/ui.h"
Go to the source code of this file.
Macros | |
#define | LED_PIN 2 |
#define | BRIGHTNESS 96 |
#define | LED_TYPE WS2811 |
#define | COLOR_ORDER GRB |
#define | MATRIX_WIDTH 22 |
#define | MATRIX_HEIGHT 22 |
#define | NUM_LEDS (MATRIX_WIDTH * MATRIX_HEIGHT) |
#define | IS_SERPINTINE true |
Functions | |
void | setup () |
void | loop () |
Variables | |
Slider | SCALE ("SCALE", 20, 20, 100) |
Slider | SPEED ("SPEED", 30, 20, 100) |
CRGB | leds [NUM_LEDS] |
XYMap | xyMap (MATRIX_WIDTH, MATRIX_HEIGHT, IS_SERPINTINE) |
NoisePalette | noisePalette1 (xyMap) |
NoisePalette | noisePalette2 (xyMap) |
FxEngine | fxEngine (NUM_LEDS) |
Checkbox | switchFx ("Switch Fx", true) |
#define BRIGHTNESS 96 |
Definition at line 23 of file FxEngine.ino.
#define COLOR_ORDER GRB |
Definition at line 25 of file FxEngine.ino.
#define IS_SERPINTINE true |
Definition at line 35 of file FxEngine.ino.
#define LED_PIN 2 |
Definition at line 22 of file FxEngine.ino.
#define LED_TYPE WS2811 |
Definition at line 24 of file FxEngine.ino.
#define MATRIX_HEIGHT 22 |
Definition at line 28 of file FxEngine.ino.
#define MATRIX_WIDTH 22 |
Definition at line 27 of file FxEngine.ino.
#define NUM_LEDS (MATRIX_WIDTH * MATRIX_HEIGHT) |
Definition at line 30 of file FxEngine.ino.
void loop | ( | ) |
Definition at line 61 of file FxEngine.ino.
void setup | ( | ) |
Definition at line 49 of file FxEngine.ino.
CRGB leds[NUM_LEDS] |
Definition at line 42 of file FxEngine.ino.