FastLED 3.9.15
Loading...
Searching...
No Matches

◆ setup()

void setup ( )

Definition at line 128 of file FxSdCard.ino.

128 {
129 Serial.begin(115200);
130 Serial.println("Sketch setup");
131 // Initialize the file system and check for errors
132 if (!filesystem.beginSd(CHIP_SELECT_PIN)) {
133 Serial.println("Failed to initialize file system.");
134 }
135
136 // Open both videos. FLED first (carries its own ScreenMap), legacy
137 // .rgb + sidecar screenmap.json as fallback. Both videos use the same
138 // physical map, so the second screenMap parse is harmless overwrite.
140 "data/video.fled", "data/video.rgb",
141 "data/screenmap.json", &screenMap);
142 if (gError) return;
143
145 "data/color_line_bubbles.fled", "data/color_line_bubbles.rgb",
146 "data/screenmap.json", &screenMap);
147 if (gError) return;
148
149 // Configure FastLED with the LED type, pin, and color order
151 .setCorrection(TypicalLEDStrip)
152 .setScreenMap(screenMap);
153 FastLED.setBrightness(96);
154 Serial.println("FastLED setup done");
155}
#define COLOR_ORDER
#define NUM_LEDS
fl::CRGB leds[NUM_LEDS]
#define LED_PIN
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
fl::Video video(NUM_LEDS, 2.0f)
fl::Video openVideoEitherFormat(const char *fledPath, const char *rgbPath, const char *sidecarScreenmapPath, fl::ScreenMap *outScreenMap)
Definition FxSdCard.ino:95
fl::FileSystem filesystem
Definition FxSdCard.ino:64
bool gError
Definition FxSdCard.ino:72
#define CHIP_SELECT_PIN
Definition FxSdCard.ino:44
fl::Video video2
Definition FxSdCard.ino:66
#define LED_TYPE
fl::ScreenMap screenMap
Definition Corkscrew.h:101
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
Definition color.h:15
#define Serial
Definition serial.h:304

References CHIP_SELECT_PIN, COLOR_ORDER, FastLED, filesystem, gError, LED_PIN, LED_TYPE, leds, NUM_LEDS, openVideoEitherFormat(), screenMap, Serial, TypicalLEDStrip, video, and video2.

+ Here is the call graph for this function: