FastLED 3.9.15
Loading...
Searching...
No Matches
FxEngine.ino File Reference

Detailed Description

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"
+ Include dependency graph for FxEngine.ino:

Go to the source code of this file.

Macros

#define BRIGHTNESS   96
 
#define COLOR_ORDER   GRB
 
#define IS_SERPINTINE   true
 
#define LED_PIN   2
 
#define LED_TYPE   WS2811
 
#define MATRIX_HEIGHT   22
 
#define MATRIX_WIDTH   22
 
#define NUM_LEDS   (MATRIX_WIDTH * MATRIX_HEIGHT)
 

Functions

void loop ()
 
void setup ()
 

Variables

FxEngine fxEngine (NUM_LEDS)
 
CRGB leds [NUM_LEDS]
 
NoisePalette noisePalette1 (xyMap)
 
NoisePalette noisePalette2 (xyMap)
 
UISlider SCALE ("SCALE", 20, 20, 100)
 
UISlider SPEED ("SPEED", 30, 20, 100)
 
UICheckbox switchFx ("Switch Fx", true)
 
XYMap xyMap (MATRIX_WIDTH, MATRIX_HEIGHT, IS_SERPINTINE)