25#define LED_TYPE WS2811
26#define COLOR_ORDER GRB
28#define MATRIX_WIDTH 22
29#define MATRIX_HEIGHT 22
30#define NUM_LEDS (MATRIX_WIDTH * MATRIX_HEIGHT)
46 uint32_t total_bytes_written = 0;
49 for (uint32_t i = 0; i <
NUM_LEDS; ++i) {
51 size_t bytes_written =
memoryStream->writeCRGB(&color, 1);
52 if (bytes_written != 1) {
53 FL_DBG(
"Failed to write frame data, wrote " << bytes_written <<
" bytes");
56 total_bytes_written += bytes_written;
58 if (total_bytes_written) {
59 FL_DBG(
"Frame written, total bytes: " << total_bytes_written);
fl::FxEngine fxEngine(NUM_LEDS)
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
fl::FxEngine fxEngine(NUM_LEDS)
const uint32_t BUFFER_SIZE
fl::Video video(NUM_LEDS, 2.0f)
fl::memorybufPtr memoryStream
fl::XYMap xymap(MATRIX_WIDTH, MATRIX_HEIGHT)
const int BYTES_PER_FRAME
void write_one_frame(fl::memorybufPtr memoryStream)
Manages and renders multiple visual effects (Fx) for LED strips.
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
#define EVERY_N_MILLISECONDS(N)
Alias for EVERY_N_MILLIS.
Centralized logging categories for FastLED hardware interfaces and subsystems.
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.
shared_ptr< T > make_shared(Args &&... args) FL_NOEXCEPT
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Representation of an 8-bit RGB pixel (Red, Green, Blue)