Hi everyone. I’ve got a bunch of WS2811 LEDs running fine as RGB, and bought a second bunch that work fine as GRB. Is there an easy way to use them together in one string?
marmil
(Marc Miller)
December 9, 2018, 6:06am
2
I believe you can use this sort of setup to do that. Set the correct color order on each addLeds line.
// MultipleStripsInOneArray - 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 three
// different pins, each strip will be referring to a different part of the single led array
#include <FastLED.h>
#define NUM_STRIPS 3
#define NUM_LEDS_PER_STRIP 60
#define NUM_LEDS NUM_LEDS_PER_STRIP * NUM_STRIPS
CRGB leds[NUM_STRIPS * NUM_LEDS_PER_STRIP];
// 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 2, starting at index 0 in the led array
FastLED.addLeds<NEOPIXEL, 2>(leds, 0, NUM_LEDS_PER_STRIP);
// tell FastLED there's 60 NEOPIXEL leds on pin 3, starting at index 60 in the led array
FastLED.addLeds<NEOPIXEL, 3>(leds, NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);
This file has been truncated. show original
Another option is to use a subroutine that swaps the color order around for the pixels in one of the strings before updating the display.
Something like:
fill the entire strip with whatever routine you’re running.
run subroutine to swap color order on part of strip.
call FastLED.show to update the display.
Yves_BAZIN
(Yves BAZIN)
December 9, 2018, 7:53am
3
@dave_brooks i had the same issue for my panel I used a routine to swap the colors and it works really fine.