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

◆ setup()

void setup ( )

Definition at line 35 of file Codec.ino.

35 {
36 Serial.begin(115200);
37 Serial.println("FastLED Multimedia Codec Demonstration");
38 Serial.println("Click buttons to decode JPEG, GIF, and MPEG1 formats");
39
40 // xymap is for the wasm compiler and is otherwise a no-op.
41 // 32x32 grid for WASM display using XYMap
43
45 .setCorrection(TypicalLEDStrip)
46 .setScreenMap(xymap.toScreenMap());
47
48
49 FastLED.setBrightness(50);
50
51 // Clear LEDs
53 FastLED.show();
54
55 // UI buttons are initialized via constructors
56
57 // Initialize codec processor with LED array
60 CodecProcessor::ledWidth = WIDTH; // 32x32 for 1:1 mapping
62
63 Serial.println("System initialized - codec demonstration ready. Click buttons to decode formats...");
64}
#define COLOR_ORDER
#define NUM_LEDS
fl::CRGB leds[NUM_LEDS]
XYMap xymap
#define DATA_PIN
Definition ClientReal.h:82
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
#define WIDTH
#define LED_TYPE
#define HEIGHT
static XYMap constructRectangularGrid(u16 width, u16 height, u16 offset=0) FL_NOEXCEPT
Definition xymap.cpp.hpp:35
void fill_solid(CRGB *targetArray, int numToFill, const CRGB &color) FL_NOEXCEPT
Fill a range of LEDs with a solid color.
Definition fill.cpp.hpp:9
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
Definition color.h:15
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Definition crgb.h:510
#define Serial
Definition serial.h:304

References fl::CRGB::Black, COLOR_ORDER, fl::XYMap::constructRectangularGrid(), DATA_PIN, FastLED, fill_solid(), HEIGHT, LED_TYPE, CodecProcessor::ledHeight, CodecProcessor::leds, leds, CodecProcessor::ledWidth, NUM_LEDS, CodecProcessor::numLeds, Serial, TypicalLEDStrip, WIDTH, and xymap.

+ Here is the call graph for this function: