FastLED 3.9.7
Loading...
Searching...
No Matches
Pride2015.ino
1#include <FastLED.h>
2#include "fx/1d/pride2015.hpp"
3
4using namespace fl;
5
6#define DATA_PIN 3
7#define LED_TYPE WS2811
8#define COLOR_ORDER GRB
9#define NUM_LEDS 200
10#define BRIGHTNESS 255
11
12CRGB leds[NUM_LEDS];
13Pride2015 pride(NUM_LEDS);
14
15void setup() {
16 delay(3000); // 3 second delay for recovery
17
18 // tell FastLED about the LED strip configuration
19 FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds, NUM_LEDS)
20 .setCorrection(TypicalLEDStrip)
21 .setDither(BRIGHTNESS < 255);
22
23 // set master brightness control
24 FastLED.setBrightness(BRIGHTNESS);
25}
26
27void loop() {
28 pride.draw(Fx::DrawContext(millis(), leds));
29 FastLED.show();
30}
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:45
central include file for FastLED, defines the CFastLED class/object
void setBrightness(uint8_t scale)
Set the global brightness scaling.
Definition FastLED.h:723
void show(uint8_t scale)
Update all our controllers with the current led colors, using the passed in brightness.
Definition FastLED.cpp:94
static CLEDController & addLeds(CLEDController *pLed, struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a CLEDController instance to the world.
Definition FastLED.cpp:79
void draw(Fx::DrawContext context) override
Definition pride2015.hpp:36
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
Definition color.h:19
Implements a simple red square effect for 2D LED grids.
Definition crgb.h:16
Animated, ever-changing rainbows (Pride2015 effect)
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:54