FastLED 3.9.15
Loading...
Searching...
No Matches
MultiArrays.ino
Go to the documentation of this file.
1
4
5// MultiArrays - see https://github.com/FastLED/FastLED/wiki/Multiple-Controller-Examples for more info on
6// using multiple controllers. In this example, we're going to set up three NEOPIXEL strips on three
7// different pins, each strip getting its own CRGB array to be played with
8
9#include <FastLED.h>
10
11#define NUM_LEDS_PER_STRIP 60
15
16// For mirroring strips, all the "special" stuff happens just in setup. We
17// just addLeds multiple times, once for each strip
18void setup() {
19 // tell FastLED there's 60 NEOPIXEL leds on pin 10
21
22 // tell FastLED there's 60 NEOPIXEL leds on pin 11
24
25 // tell FastLED there's 60 NEOPIXEL leds on pin 12
27
28}
29
30void loop() {
31 for(int i = 0; i < NUM_LEDS_PER_STRIP; i++) {
32 // set our current dot to red, green, and blue
33 redLeds[i] = CRGB::Red;
36 FastLED.show();
37 // clear our current dot before we move on
41 delay(100);
42 }
43
44 for(int i = NUM_LEDS_PER_STRIP-1; i >= 0; i--) {
45 // set our current dot to red, green, and blue
46 redLeds[i] = CRGB::Red;
49 FastLED.show();
50 // clear our current dot before we move on
54 delay(100);
55 }
56}
void setup()
void loop()
#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
CRGB blueLeds[NUM_LEDS_PER_STRIP]
CRGB greenLeds[NUM_LEDS_PER_STRIP]
CRGB redLeds[NUM_LEDS_PER_STRIP]
LED controller for WS2812 LEDs with GRB color order.
Definition FastLED.h:138
@ Green
<div style='background:#008000;width:4em;height:4em;'></div>
Definition crgb.h:547
@ Blue
<div style='background:#0000FF;width:4em;height:4em;'></div>
Definition crgb.h:501
@ 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