FastLED 3.6.0
Loading...
Searching...
No Matches
RGBSetDemo.ino
#include <FastLED.h>
#define NUM_LEDS 40
void setup() { FastLED.addLeds<NEOPIXEL,2>(leds, NUM_LEDS); }
void loop(){
static uint8_t hue;
for(int i = 0; i < NUM_LEDS/2; i++) {
// fade everything out
leds.fadeToBlackBy(40);
// let's set an led value
leds[i] = CHSV(hue++,255,255);
// now, let's first 20 leds to the top 20 leds,
leds(NUM_LEDS/2,NUM_LEDS-1) = leds(NUM_LEDS/2 - 1 ,0);
}
}
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:17
central include file for FastLED, defines the CFastLED class/object
void delay(unsigned long ms)
Delay for the given number of milliseconds.
Definition FastLED.cpp:132
static CLEDController & addLeds(CLEDController *pLed, struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a CLEDController instance to the world.
Definition FastLED.cpp:42
A version of CPixelView<CRGB> with an included array of CRGB LEDs.
Definition pixelset.h:406
LED controller for WS2812 LEDs with GRB color order.
Definition FastLED.h:119
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Definition pixeltypes.h:27
CRGB & fadeToBlackBy(uint8_t fadefactor)
fadeToBlackBy is a synonym for nscale8(), as a fade instead of a scale
Definition pixeltypes.h:437