FastLED 3.9.15
Loading...
Searching...
No Matches
RGBSetDemo.ino
Go to the documentation of this file.
1
4
5#include <FastLED.h>
6#define NUM_LEDS 40
7
9
10void setup() { FastLED.addLeds<NEOPIXEL,2>(leds, NUM_LEDS); }
11
12void loop(){
13 static uint8_t hue;
14 for(int i = 0; i < NUM_LEDS/2; i++) {
15 // fade everything out
16 leds.fadeToBlackBy(40);
17
18 // let's set an led value
19 leds[i] = CHSV(hue++,255,255);
20
21 // now, let's first 20 leds to the top 20 leds,
22 leds(NUM_LEDS/2,NUM_LEDS-1) = leds(NUM_LEDS/2 - 1 ,0);
23 FastLED.delay(33);
24 }
25}
26
void setup()
void loop()
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
A version of CPixelView<CRGB> with an included array of CRGB LEDs.
Definition pixelset.h:461
LED controller for WS2812 LEDs with GRB color order.
Definition FastLED.h:138
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Definition chsv.h:16