FastLED 3.9.15
Loading...
Searching...
No Matches
FxTwinkleFox.ino
Go to the documentation of this file.
1#include "FastLED.h"
2#include "fx/1d/twinklefox.h"
3
4using namespace fl;
5
6#define NUM_LEDS 100
7#define LED_TYPE WS2811
8#define COLOR_ORDER GRB
9#define DATA_PIN 3
10#define VOLTS 12
11#define MAX_MA 4000
12
15
16void setup() {
17 delay(3000); // safety startup delay
18 FastLED.setMaxPowerInVoltsAndMilliamps(VOLTS, MAX_MA);
20 .setCorrection(TypicalLEDStrip)
21 .setRgbw();
22}
23
24void loop() {
26 twinkleFox.chooseNextColorPalette(twinkleFox.targetPalette);
27 }
28 twinkleFox.draw(Fx::DrawContext(millis(), leds));
29 FastLED.show();
30}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
#define NUM_LEDS
Definition Apa102.ino:6
#define COLOR_ORDER
#define LED_TYPE
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:58
central include file for FastLED, defines the CFastLED class/object
#define VOLTS
void setup()
TwinkleFox twinkleFox(NUM_LEDS)
#define MAX_MA
void loop()
A version of CPixelView<CRGB> with an included array of CRGB LEDs.
Definition pixelset.h:461
_DrawContext DrawContext
Definition fx.h:21
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
Definition color.h:19
#define EVERY_N_SECONDS(N)
Checks whether to execute a block of code every N seconds.
Definition lib8tion.h:1324
Implements a simple red square effect for 2D LED grids.
Definition crgb.h:16
#define SECONDS_PER_PALETTE
Definition twinklefox.h:97