FastLED 3.9.15
Loading...
Searching...
No Matches
FxDemoReel100.ino
Go to the documentation of this file.
1
10
11#include <FastLED.h>
12#include "fx/1d/demoreel100.h"
13#include "fl/screenmap.h"
14#include "defs.h" // for NUM_LEDS
15
16
17#if !HAS_ENOUGH_MEMORY
18void setup() {}
19void loop() {}
20#else
21
22
23using namespace fl;
24
25#define DATA_PIN 3
26//#define CLK_PIN 4
27#define LED_TYPE WS2811
28#define COLOR_ORDER GRB
29#define NUM_LEDS 64
30
32
33#define BRIGHTNESS 96
34#define FRAMES_PER_SECOND 120
35#define USES_RGBW 0
36
37#if USES_RGBW
38Rgbw rgbwMode = RgbwDefault();
39#else
40Rgbw rgbwMode = RgbwInvalid(); // No RGBW mode, just use RGB.
41#endif
42
43DemoReel100Ptr demoReel = fl::make_shared<DemoReel100>(NUM_LEDS);
44
45void setup() {
47
48 // tell FastLED about the LED strip configuration
50 .setCorrection(TypicalLEDStrip)
51 .setScreenMap(screenMap)
52 .setRgbw(rgbwMode);
53
54 // set master brightness control
55 FastLED.setBrightness(BRIGHTNESS);
56}
57
58void loop()
59{
60 // Run the DemoReel100 draw function
61 demoReel->draw(Fx::DrawContext(millis(), leds));
62
63 // send the 'leds' array out to the actual LED strip
64 FastLED.show();
65 // insert a delay to keep the framerate modest
66 FastLED.delay(1000/FRAMES_PER_SECOND);
67}
68
69
70#endif // HAS_ENOUGH_MEMORY
CRGB leds[NUM_LEDS]
#define NUM_LEDS
#define DATA_PIN
#define BRIGHTNESS
Definition Blur.ino:8
#define FRAMES_PER_SECOND
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:74
central include file for FastLED, defines the CFastLED class/object
void setup()
void loop()
#define COLOR_ORDER
Definition advanced.h:42
#define LED_TYPE
Definition advanced.h:41
_DrawContext DrawContext
Definition fx.h:21
static ScreenMap DefaultStrip(int numLeds, float cm_between_leds=1.5f, float cm_led_diameter=0.2f, float completion=.9f)
Definition screenmap.h:40
fl::ScreenMap screenMap
Definition Corkscrew.h:103
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
Definition color.h:19
shared_ptr< T > make_shared(Args &&... args)
Definition shared_ptr.h:348
IMPORTANT!
Definition crgb.h:20
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:86