FastLED 3.9.15
Loading...
Searching...
No Matches
gfx.cpp
Go to the documentation of this file.
1
2#include "gfx.h"
3#include "FastLED.h"
4
5// the rendering buffer (16*16)
6// do not touch
8XYMap xyMap = XYMap::constructRectangularGrid(CUSTOM_WIDTH, CUSTOM_HEIGHT);
9
11 // set the brightness
12 auto* controller = &FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds + 5, NUM_LEDS - 5);
13 fl::ScreenMap screenMap = xyMap.toScreenMap();
14 controller->setScreenMap(screenMap);
15 // use this line only when using a custom size matrix
16 // FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds2, CUSTOM_HEIGHT *
17 // CUSTOM_WIDTH);
18 FastLED.setBrightness(BRIGHTNESS);
19 FastLED.setDither(0);
20}
21
23 // when using a matrix different than 16*16 use
24 // RenderCustomMatrix();
25 FastLED.show();
26}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
#define NUM_LEDS
Definition Apa102.ino:6
XYMap xyMap(WIDTH, HEIGHT, false)
#define BRIGHTNESS
Definition Blur.ino:8
#define COLOR_ORDER
#define LED_PIN
#define CHIPSET
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:58
central include file for FastLED, defines the CFastLED class/object
fl::ScreenMap screenMap
#define CUSTOM_WIDTH
Definition defs.h:16
#define CUSTOM_HEIGHT
Definition defs.h:17
CLEDController * controller
void InitGraphics()
Definition gfx.cpp:10
void GraphicsShow()
Definition gfx.cpp:22
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:55