39#define LED_TYPE WS2811
40#define COLOR_ORDER GRB
42#define CHIP_SELECT_PIN 5
46#define MATRIX_WIDTH 32
47#define MATRIX_HEIGHT 32
48#define NUM_VIDEO_FRAMES 2
51#define NUM_LEDS (MATRIX_WIDTH * MATRIX_HEIGHT)
52#define IS_SERPINTINE true
56UIDescription 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.");
74 Serial.println(
"Sketch setup");
76 Serial.println(
"Failed to initialize file system.");
99 Serial.println(
"Failed to read screen map");
108 Serial.println(
"FastLED setup done");
112 static bool s_first =
true;
115 Serial.println(
"First loop.");
125 uint32_t now = millis();
CFastLED FastLED
Global LED strip management instance.
central include file for FastLED, defines the CFastLED class/object
UISlider videoSpeed("Video Speed", 1.0f, -1, 2.0f, 0.01f)
UIDescription 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.")
UINumberField whichVideo("Which Video", 0, 0, 1)
UITitle title("SDCard Demo - Mapped Video")
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)