You know that moment when you realize you’ve just figured out how to do something, whether it’s code or hardware, and a fraction of a second later … it’s gone? Yeah … that just happened. Soooo I’m connecting several strips to a single board, and trying to run code that’s displayed across all the strips. Think of a matrix made out of individual strips that are not daisy chained together. How can I run something like noise across all of them so it actually looks like a matrix?
When this happens to me, I find it usually happens because I was actually wrong, but for some reason, instead of realizing why, my brain instead just experiences a disconnect and jumps to a new idea (and tries very hard to delete the old one). Eventually I can work out the original idea and then I can see what was wrong. Very annoying because it makes me feel like I need to chase down an idea and I can sometimes spend a lot of time on that, and all only to find out it was wrong.
So your strips are laid out like:
pin0: 0…n
pin1: 0…n
pin2: 0…n
…
pinm:0…n
We’ll call (pin0, 0) your origin; pinm is your max y value (height) and n is your max x value (width.)
// ledsArrays is an array of pointers to the leds arrays of each pin. This probably isn’t quite the right syntax but you get what I mean
pin0leds = CRGB[n];
pin1leds = CRGB[n];
pin2leds = CRGB[n];
…
pinmleds = CRGB[n];
CRGB[] ledsArrays = {pin0leds, pin1leds, pin2leds, …, pinmleds);
pixel(int x, int y, CRGB colour) {
CRGB *leds = ledsArrays[y];
leds[x] = colour;
}
Also, as a side note, is this multiple-leds-arrays-off-multiple-pins feature in the 2.1 branch now?
One Array Many Strips. Works with noise, palette, funkyclouds. Breaks after 255 leds though (havent troubleshooted yet).
leds[NUM_STRIPS * NUM_LEDS_PER_STRIP]
FastLED.addLeds<CHIPSET, 2, GRB>(leds, NUM_LEDS_PER_STRIP * 0, NUM_LEDS_PER_STRIP);
FastLED.addLeds<CHIPSET, 14, GRB>(leds, NUM_LEDS_PER_STRIP * 1, NUM_LEDS_PER_STRIP);
…
FastLED.addLeds<CHIPSET, 5, GRB>(leds, NUM_LEDS_PER_STRIP * 7, NUM_LEDS_PER_STRIP);