FastLED 3.9.15
Loading...
Searching...
No Matches
MirroringSample.ino
// MirroringSample - see https://github.com/FastLED/FastLED/wiki/Multiple-Controller-Examples for more info on
// using multiple controllers. In this example, we're going to set up four NEOPIXEL strips on four
// different pins, and show the same thing on all four of them, a simple bouncing dot/cyclon type pattern
#include <FastLED.h>
#define NUM_LEDS_PER_STRIP 60
// For mirroring strips, all the "special" stuff happens just in setup. We
// just addLeds multiple times, once for each strip
void setup() {
// tell FastLED there's 60 NEOPIXEL leds on pin 4
// tell FastLED there's 60 NEOPIXEL leds on pin 5
// tell FastLED there's 60 NEOPIXEL leds on pin 6
// tell FastLED there's 60 NEOPIXEL leds on pin 7
}
void loop() {
for(int i = 0; i < NUM_LEDS_PER_STRIP; i++) {
// set our current dot to red
FastLED.show();
// clear our current dot before we move on
delay(100);
}
for(int i = NUM_LEDS_PER_STRIP-1; i >= 0; i--) {
// set our current dot to red
FastLED.show();
// clear our current dot before we move on
delay(100);
}
}
void setup()
void loop()
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
#define NUM_LEDS_PER_STRIP
CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:58
central include file for FastLED, defines the CFastLED class/object
LED controller for WS2812 LEDs with GRB color order.
Definition FastLED.h:138
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
Definition crgb.h:611
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Definition crgb.h:499
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:54