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
7
CRGB
leds
[
NUM_LEDS
];
8
XYMap
xyMap
= XYMap::constructRectangularGrid(
CUSTOM_WIDTH
,
CUSTOM_HEIGHT
);
9
10
void
InitGraphics
() {
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
22
void
GraphicsShow
() {
23
// when using a matrix different than 16*16 use
24
// RenderCustomMatrix();
25
FastLED
.show();
26
}
leds
CRGB leds[NUM_LEDS]
Definition
Apa102.ino:11
NUM_LEDS
#define NUM_LEDS
Definition
Apa102.ino:6
xyMap
XYMap xyMap(WIDTH, HEIGHT, false)
BRIGHTNESS
#define BRIGHTNESS
Definition
Blur.ino:8
COLOR_ORDER
#define COLOR_ORDER
Definition
ColorPalette.ino:11
LED_PIN
#define LED_PIN
Definition
ColorPalette.ino:7
CHIPSET
#define CHIPSET
Definition
ColorTemperature.ino:11
FastLED
CFastLED FastLED
Global LED strip management instance.
Definition
FastLED.cpp:58
FastLED.h
central include file for FastLED, defines the CFastLED class/object
screenMap
fl::ScreenMap screenMap
Definition
FestivalStick.ino:135
CUSTOM_WIDTH
#define CUSTOM_WIDTH
Definition
defs.h:16
CUSTOM_HEIGHT
#define CUSTOM_HEIGHT
Definition
defs.h:17
controller
CLEDController * controller
Definition
FxNoiseRing.ino:51
fl::ScreenMap
Definition
screenmap.h:27
InitGraphics
void InitGraphics()
Definition
gfx.cpp:10
GraphicsShow
void GraphicsShow()
Definition
gfx.cpp:22
gfx.h
CRGB
Representation of an RGB pixel (Red, Green, Blue)
Definition
crgb.h:55
examples
FunkyClouds
gfx.cpp
Generated on Thu May 29 2025 04:44:56 for FastLED by
1.13.2