FastLED 3.9.3
Loading...
Searching...
No Matches
TwinkleFox.ino
1#include "FastLED.h"
3
4#define NUM_LEDS 100
5#define LED_TYPE WS2811
6#define COLOR_ORDER GRB
7#define DATA_PIN 3
8#define VOLTS 12
9#define MAX_MA 4000
10
12TwinkleFoxRef twinkleFox = TwinkleFoxRef::New(NUM_LEDS);
13
14void setup() {
15 delay(3000); // safety startup delay
17 FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS)
18 .setCorrection(TypicalLEDStrip)
19 .setRgbw();
20
21 twinkleFox->lazyInit();
22}
23
24void loop() {
25 EVERY_N_SECONDS(SECONDS_PER_PALETTE) {
26 twinkleFox->chooseNextColorPalette(twinkleFox->targetPalette);
27 }
28 twinkleFox->draw(Fx::DrawContext(millis(), leds));
29 FastLED.show();
30}
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:33
central include file for FastLED, defines the CFastLED class/object
void show(uint8_t scale)
Update all our controllers with the current led colors, using the passed in brightness.
Definition FastLED.cpp:82
void setMaxPowerInVoltsAndMilliamps(uint8_t volts, uint32_t milliamps)
Set the maximum power to be used, given in volts and milliamps.
Definition FastLED.h:731
static CLEDController & addLeds(CLEDController *pLed, struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a CLEDController instance to the world.
Definition FastLED.cpp:67
A version of CPixelView<CRGB> with an included array of CRGB LEDs.
Definition pixelset.h:446
@ 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:1288
Twinkling "holiday" lights that fade in and out.