Just to explain a bit further, to use multiple instances of WS2812Serial, at the top of your program would do something like this:
Code:
const int numled1 = 50;
const int pin1 = 1;
byte drawingMemory1[numled*4]; // 4 bytes per LED for RGBW
DMAMEM byte displayMemory1[numled*16]; // 16 bytes per LED for RGBW
WS2812Serial leds1(numled1, displayMemory1, drawingMemory1, pin1, WS2812_GRBW);
const int numled2 = 80;
const int pin2 = 8;
byte drawingMemory2[numled*4]; // 4 bytes per LED for RGBW
DMAMEM byte displayMemory2[numled*16]; // 16 bytes per LED for RGBW
WS2812Serial leds2(numled2, displayMemory2, drawingMemory2, pin2, WS2812_GRBW);
const int numled3 = 45;
const int pin3 = 14;
byte drawingMemory3[numled*4]; // 4 bytes per LED for RGBW
DMAMEM byte displayMemory3[numled*16]; // 16 bytes per LED for RGBW
WS2812Serial leds3(numled3, displayMemory3, drawingMemory3, pin3, WS2812_GRBW);
Hopefully this is not too difficult to understand. Just duplicate all the instance info for each LED strip. You must assign a unique serial pin to each instance, so each uses its own hardware resources.
Then in setup:
Code:
void setup() {
leds1.begin();
leds2.begin();
leds3.begin();
}
As you change the LEDs, you can call each instance's show() function when you want it to update. Because show() is non-blocking, if you call them all like this:
Code:
void loop() {
// draw something
leds1.show();
leds2.show();
leds3.show();
delay(33); // approx 30 Hz refresh rate
}
All 3 will transmit data at the same time.