FastLED 3.9.15
Loading...
Searching...
No Matches
FxCylon.ino
Go to the documentation of this file.
1
10
11#include <FastLED.h>
12#include "fx/1d/cylon.h"
13#include "fl/screenmap.h"
14
15using namespace fl;
16
17// How many leds in your strip?
18#define NUM_LEDS 64
19
20// For led chips like Neopixels, which have a data line, ground, and power, you just
21// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock,
22// ground, and power).
23#define DATA_PIN 2
24
25// Define the array of leds
27
28// Create a Cylon instance
30
31void setup() {
33 FastLED.addLeds<WS2812,DATA_PIN,RGB>(leds,NUM_LEDS).setRgbw().setScreenMap(screenMap);
34 FastLED.setBrightness(84);
35}
36
37void loop() {
38 cylon.draw(Fx::DrawContext(millis(), leds));
39 FastLED.show();
40 delay(cylon.delay_ms);
41}
CRGB leds[NUM_LEDS]
#define NUM_LEDS
#define DATA_PIN
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()
Definition FxCylon.ino:31
Cylon cylon(NUM_LEDS)
void loop()
Definition FxCylon.ino:37
WS2812 controller class.
Definition FastLED.h:218
An animation that moves a single LED back and forth (Larson Scanner effect)
Definition cylon.h:13
_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
@ RGB
Red, Green, Blue (0012)
Definition eorder.h:14
IMPORTANT!
Definition crgb.h:20
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:86