FastLED 3.9.12
Loading...
Searching...
No Matches
WS2816.ino
Go to the documentation of this file.
1
7
8#include <FastLED.h>
9
10// How many leds in your strip?
11#define NUM_LEDS 1
12
13
14#define DATA_PIN 3
15
16
17// Define the array of leds
18CRGB leds[NUM_LEDS];
19
20void setup() {
21 // Uncomment/edit one of the following lines for your leds arrangement.
22 // ## Clockless types ##
23 FastLED.addLeds<WS2816, DATA_PIN>(leds, NUM_LEDS); // GRB ordering is assumed
24}
25
26void loop() {
27 // Turn the LED on, then pause
28 leds[0] = CRGB::Red;
29 FastLED.show();
30 delay(500);
31 // Now turn the LED off, then pause
32 leds[0] = CRGB::Black;
33 FastLED.show();
34 delay(500);
35}
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:45
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: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
WS2816 controller class.
Definition FastLED.h:198
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:54
@ Red
Definition crgb.h:608
@ Black
Definition crgb.h:496