18#include "fx/2d/noisepalette.hpp"
20#include "fx/fx_engine.h"
22#include "file_system.h"
25#include "file_system.h"
28#define LED_TYPE WS2811
29#define COLOR_ORDER GRB
31#define CHIP_SELECT_PIN 5
34#define MATRIX_WIDTH 32
35#define MATRIX_HEIGHT 32
38#define NUM_LEDS (MATRIX_WIDTH * MATRIX_HEIGHT)
39#define IS_SERPINTINE true
42XYMap xyMap(MATRIX_WIDTH, MATRIX_HEIGHT, IS_SERPINTINE);
51 if (!filesystem.beginSd(CHIP_SELECT_PIN)) {
52 Serial.println(
"Failed to initialize file system.");
59 video = filesystem.openVideo(
"data/video.dat", NUM_LEDS, FPS);
61 Serial.println(
"Failed to instantiate video");
66 uint32_t now = millis();
69 video.draw(now, leds);
72 Serial.println(
"Drawing");
73 for (
int i = 0; i < NUM_LEDS;) {
74 int nleft = MIN(8, NUM_LEDS - i);
75 for (
int j = 0; j < nleft; j++) {
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.
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
uint8_t r
Red channel value.
uint8_t g
Green channel value.
uint8_t b
Blue channel value.
#define EVERY_N_SECONDS(N)
Checks whether to execute a block of code every N seconds.
Representation of an RGB pixel (Red, Green, Blue)