I’ve got 5 strips of 60 pixels arranged vertically around my Christmas tree, each on their own data pin, running on an Uno using the setup from the Multiple Controllers example using an offset. No complaints really, but I thought maybe the patterns and gradients might looks better if the order of the pixels were mapped differently.
Instead of vertically, 1 strip to the next, I thought it might look better if I were to order them horizontally, so the array would be like [Strip1LED0, Strip2LED0…Strip1LED1, Strip2LED1…] etc… (does that make sense).
I tried writing a FOR statement to map them like that, but I’m pretty sure my syntax is wonky because as soon as I try to compile, I get out of memory errors. I’d like to store this layout in addition to the vertical layout so I can change up patterns and such. Maybe this is an XY Grid thing? I dunno. Please send suggestions :).
That’s my working setup. The simplest of multi-pin strip arrays, but it stores them in order starting with Pin 3, 0-59, then Pin 4 0-59, but offset to store into the array at position 60. So on and so forth.
My initial thought was to write a FOR statement, like I mentioned, but I think my logic is flawed since the addLeds function only works with totals per strip, so I’m not sure I can just iterate and offset how it is in my head where
Here’s the entire sketch: https://gist.github.com/ctkjedi/e645b2710fd83ea83b111e832c3288f6. I’m just running palettes for now. Just thought those palettes would look better if they mapped as if they were twirling their way around and down the tree rather than just straight down each strip.
@Christopher_Kirkman1 - You might be able to adapt @Jason_Coon 's V2 Tree mapping technique to your tree. It can be found with the code at:
Also, you can see how I adapted Jason’s mapping method to a 8X8 matrix. This might get you the animation looks that you desire. See my post and code at:
What I found after adding my specific pin setup and removing code here and there was that the memory usage would jump from 236% down to 58% when I removed the mapNoiseToLEDsUsingPalette() function.
@Christopher_Kirkman1 - If you look at the Jack-o’-LED•trix project, it is run on a Teensy LC. The Arduino Uno does not have enough memory for your code as you found out. Your code does compile on the Arduino IDE 1.8.7 for a Teensy 3.1/3.2 and for a Wemos d1 mini pro. You might want to try one of these MCUs.