first commit
This commit is contained in:
commit
5893b00dd2
1669 changed files with 1982740 additions and 0 deletions
26
libraries/FastLED/examples/FunkyClouds/gfx.cpp
Normal file
26
libraries/FastLED/examples/FunkyClouds/gfx.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
#include "gfx.h"
|
||||
#include "FastLED.h"
|
||||
|
||||
// the rendering buffer (16*16)
|
||||
// do not touch
|
||||
CRGB leds[NUM_LEDS];
|
||||
XYMap xyMap = XYMap::constructRectangularGrid(CUSTOM_WIDTH, CUSTOM_HEIGHT);
|
||||
|
||||
void InitGraphics() {
|
||||
// set the brightness
|
||||
auto* controller = &FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds + 5, NUM_LEDS - 5);
|
||||
fl::ScreenMap screenMap = xyMap.toScreenMap();
|
||||
controller->setScreenMap(screenMap);
|
||||
// use this line only when using a custom size matrix
|
||||
// FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds2, CUSTOM_HEIGHT *
|
||||
// CUSTOM_WIDTH);
|
||||
FastLED.setBrightness(BRIGHTNESS);
|
||||
FastLED.setDither(0);
|
||||
}
|
||||
|
||||
void GraphicsShow() {
|
||||
// when using a matrix different than 16*16 use
|
||||
// RenderCustomMatrix();
|
||||
FastLED.show();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue