FastLED 3.9.15
Loading...
Searching...
No Matches
FxCylon.ino
Go to the documentation of this file.
1
4
5#include <FastLED.h>
6#include "fx/1d/cylon.h"
7
8using namespace fl;
9
10// How many leds in your strip?
11#define NUM_LEDS 64
12
13// For led chips like Neopixels, which have a data line, ground, and power, you just
14// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock,
15// ground, and power).
16#define DATA_PIN 2
17
18// Define the array of leds
20
21// Create a Cylon instance
23
24void setup() {
25 FastLED.addLeds<WS2812,DATA_PIN,RGB>(leds,NUM_LEDS).setRgbw();
26 FastLED.setBrightness(84);
27}
28
29void loop() {
30 cylon.draw(Fx::DrawContext(millis(), leds));
31 FastLED.show();
32 delay(cylon.delay_ms);
33}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
#define NUM_LEDS
Definition Apa102.ino:6
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:58
central include file for FastLED, defines the CFastLED class/object
void setup()
Definition FxCylon.ino:24
Cylon cylon(NUM_LEDS)
void loop()
Definition FxCylon.ino:29
WS2812 controller class.
Definition FastLED.h:193
An animation that moves a single LED back and forth (Larson Scanner effect)
Definition cylon.h:13
_DrawContext DrawContext
Definition fx.h:21
@ RGB
Red, Green, Blue (0012)
Definition eorder.h:15
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:54