FastLED 3.9.15
Loading...
Searching...
No Matches
FxDemoReel100.ino
Go to the documentation of this file.
1
4
5#include <FastLED.h>
6#include "fx/1d/demoreel100.h"
7#include "fl/screenmap.h"
8#include "defs.h" // for NUM_LEDS
9
10
11#if !HAS_ENOUGH_MEMORY
12void setup() {}
13void loop() {}
14#else
15
16
17using namespace fl;
18
19#define DATA_PIN 3
20//#define CLK_PIN 4
21#define LED_TYPE WS2811
22#define COLOR_ORDER GRB
23#define NUM_LEDS 64
24
26
27#define BRIGHTNESS 96
28#define FRAMES_PER_SECOND 120
29#define USES_RGBW 0
30
31#if USES_RGBW
32Rgbw rgbwMode = RgbwDefault();
33#else
34Rgbw rgbwMode = RgbwInvalid(); // No RGBW mode, just use RGB.
35#endif
36
37DemoReel100Ptr demoReel = DemoReel100Ptr::New(NUM_LEDS);
38
39void setup() {
41
42 // tell FastLED about the LED strip configuration
44 .setCorrection(TypicalLEDStrip)
45 .setScreenMap(screenMap)
46 .setRgbw(rgbwMode);
47
48 // set master brightness control
49 FastLED.setBrightness(BRIGHTNESS);
50}
51
52void loop()
53{
54 // Run the DemoReel100 draw function
55 demoReel->draw(Fx::DrawContext(millis(), leds));
56
57 // send the 'leds' array out to the actual LED strip
58 FastLED.show();
59 // insert a delay to keep the framerate modest
60 FastLED.delay(1000/FRAMES_PER_SECOND);
61}
62
63
64#endif // HAS_ENOUGH_MEMORY
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
#define NUM_LEDS
Definition Apa102.ino:6
#define BRIGHTNESS
Definition Blur.ino:8
#define COLOR_ORDER
#define LED_TYPE
#define FRAMES_PER_SECOND
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:58
central include file for FastLED, defines the CFastLED class/object
fl::ScreenMap screenMap
void setup()
void loop()
_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:33
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
Definition color.h:19
Implements a simple red square effect for 2D LED grids.
Definition crgb.h:16
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:55
Definition rgbw.h:28