FastLED 3.9.15
Loading...
Searching...
No Matches

◆ setup()

void setup ( )

Definition at line 73 of file Corkscrew.h.

73 {
74 int width = corkscrew.cylinder_width();
75 int height = corkscrew.cylinder_height();
76
77 frameBuffer.reset(width, height);
79
80 CRGB *leds = frameBuffer.data();
81 size_t num_leds = frameBuffer.size();
82
84 &FastLED.addLeds<WS2812, 3, BGR>(leds, num_leds);
85
86 fl::ScreenMap screenMap = xyMap.toScreenMap();
87 screenMap.setDiameter(.2f);
88
89 // Set the screen map for the controller
90 controller->setScreenMap(screenMap);
91}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:62
CLEDController * controller
Base definition for an LED controller.
WS2812 controller class.
Definition FastLED.h:210
static XYMap constructRectangularGrid(uint16_t width, uint16_t height, uint16_t offset=0)
Definition xymap.cpp:36
@ BGR
Blue, Green, Red (0210)
Definition eorder.h:20
fl::ScreenMap screenMap
Definition Corkscrew.h:70
Corkscrew corkscrew(corkscrewInput)
fl::Grid< CRGB > frameBuffer
Definition Corkscrew.h:71
XYMap xyMap
Definition gfx.cpp:8
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:55

References BGR, XYMap::constructRectangularGrid(), controller, corkscrew(), FastLED, frameBuffer, leds, screenMap, and xyMap.

+ Here is the call graph for this function: