FastLED 3.9.15
Loading...
Searching...
No Matches
RGBSetDemo.ino
#include <FastLED.h>
#define NUM_LEDS 40
#ifdef FASTLED_TESTING
#define DELAY_MILLIS 1
#else
#define FASTLED_TESTING 33
#endif
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);
}
}
void setup()
void loop()
#define NUM_LEDS
fl::CRGB leds[NUM_LEDS]
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
#define FASTLED_TESTING
uint8_t hue
Definition advanced.h:94
A version of CPixelView<CRGB> with an included array of CRGB LEDs.
Definition pixelset.h:496
fl::hsv8 CHSV
Definition chsv.h:11