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
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
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition
FastLED.cpp:62
FastLED.h
central include file for FastLED, defines the CFastLED class/object
CUSTOM_WIDTH
#define CUSTOM_WIDTH
Definition
defs.h:16
CUSTOM_HEIGHT
#define CUSTOM_HEIGHT
Definition
defs.h:17
controller
CLEDController * controller
Definition
FxNoiseRing.ino:56
fl::ScreenMap
Definition
screenmap.h:27
screenMap
fl::ScreenMap screenMap
Definition
Corkscrew.h:70
InitGraphics
void InitGraphics()
Definition
gfx.cpp:10
xyMap
XYMap xyMap
Definition
gfx.cpp:8
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 Tue Jun 24 2025 00:58:14 for FastLED by
1.13.2