Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "FastLED.h"
- #define NUM_LEDS_PER_STRIP 80
- #define NUM_STRIPS 4
- CRGB leds[NUM_LEDS_PER_STRIP];
- CLEDController *controllers[NUM_STRIPS];
- uint8_t gBrightness = 128;
- void setup() {
- controllers[0] = &FastLED.addLeds<WS2812,1>(leds, NUM_LEDS_PER_STRIP);
- controllers[1] = &FastLED.addLeds<WS2812,2>(leds, NUM_LEDS_PER_STRIP);
- controllers[2] = &FastLED.addLeds<WS2812,10>(leds, NUM_LEDS_PER_STRIP);
- controllers[3] = &FastLED.addLeds<WS2812,11>(leds, NUM_LEDS_PER_STRIP);
- }
- void loop() {
- // draw led data for the first strand into leds
- fill_solid(leds, NUM_LEDS_PER_STRIP, CRGB::Red);
- controllers[0]->showLeds(gBrightness);
- // draw led data for the second strand into leds
- fill_solid(leds, NUM_LEDS_PER_STRIP, CRGB::Green);
- controllers[1]->showLeds(gBrightness);
- // draw led data for the third strand into leds
- fill_solid(leds, NUM_LEDS_PER_STRIP, CRGB::Blue);
- controllers[2]->showLeds(gBrightness);
- // draw led data for the first strand into leds
- fill_solid(leds, NUM_LEDS_PER_STRIP, CRGB::White);
- controllers[3]->showLeds(gBrightness);
- }
Advertisement
Add Comment
Please, Sign In to add comment