13#if !SKETCH_HAS_LOTS_OF_MEMORY
40#define LED_TYPE WS2811
41#define COLOR_ORDER GRB
43#define CHIP_SELECT_PIN 5
47#define MATRIX_WIDTH 32
48#define MATRIX_HEIGHT 32
49#define NUM_VIDEO_FRAMES 2
52#define NUM_LEDS (MATRIX_WIDTH * MATRIX_HEIGHT)
53#define IS_SERPINTINE true
57UIDescription description(
"Video data is streamed off of a SD card and displayed on a LED strip. The video data is mapped to the LED strip using a ScreenMap.");
67UISlider videoSpeed(
"Video Speed", 1.0f, -1, 2.0f, 0.01f);
75 Serial.println(
"Sketch setup");
77 if (!filesystem.
beginSd(CHIP_SELECT_PIN)) {
78 Serial.println(
"Failed to initialize file system.");
99 Serial.println(
"Failed to read screen map");
109 Serial.println(
"FastLED setup done");
113 static bool s_first =
true;
116 Serial.println(
"First loop.");
127 Video& vid = !bool(whichVideo.value()) ? video : video2;
131 uint32_t now = millis();
UITitle title("Chromancer")
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
Video openVideo(const char *path, size_t pixelsPerFrame, float fps=30.0f, size_t nFrameHistory=0)
bool readScreenMap(const char *path, const char *name, ScreenMap *out, Str *error=nullptr)
void draw(DrawContext context) override
void setTimeScale(float timeScale)
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
#define EVERY_N_SECONDS(N)
Checks whether to execute a block of code every N seconds.
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)
UIDescription description("Advanced layered and blended wave effects.")