Showing off. New member here.

Showing off. New member here. I have been using Fast LED in conjunction with LEDMatrix for about a year. Prior to that, was using the Adafruit neopixle packages.

I have been working on a series of LED matrix panels loaded into an almost stock table from Ikea. This started with a 21 by 21 made with WS2812 strips. then went to 29 x 29 (strips again) and then 43 x 43 (more strips) and now working on a 64 by 64 matrix based on 8 - 16 x 16 matrix panels.

Along the way, I moved from a Mega to a Due and then an Adafruit Metro MO express board to manage the need for more memory.

My biggest challenge was the speed at which one can push data to the WS2812. 4096 pixles takes a while. I just jumped over to the teensy 3.2 with a the OctoWS2811 Adaptor and took advantage of the latest release of FASTLED to push the data over 8 parallel lines and got a much needed boost in speed. This was a bit tricky as my coding skills are not great and the examples of fastled + octo +ledmatrix are rarer than hens teeth. None-the-less…

I managed to get it working today on a 32 by 32 (i.e. 4 - 16 x 16 panels) , using LEDMatrix commands to draw the images and then mapping the matrix to the 8 lines of OctoWS2811. I will need to tweak the mapping to run a 4 x 4 matrix of panels but the hard part is behind me. Attached link shows video of the 43 in the table running off one pin, the 64 x 64 running slowly on one pin and the new 32 x 32 running on // 8 pins. Roughly the same animation ( a spiral forming from the outside in) on each.

Looks really good! I’ve been going through a similar progression of controllers, though after my first teensyLC I jumped over to the ESP 8266 before I ever even rigged up my octo board. Running 4 way parallel output no problem, but you’ll definitely need all 8 for 4k pixels. And if you want it super buttery smooth you’ll prob need 12 or 16 way output. (I try to keep my LEDs per output pin under 500 to maintain good speeds, and even under 400 if possible)

Love your animation - I’m ready to take a break from my hardware dabbling and focus on the art/animation part for a little while. Are you building your spiral mathematically in your program code? Or are you using any tools or libraries to help with the graphics? I’ve never used the LEDMatrix libraries - is it easy to use those in conjunction with FastLED?

Thanks!

How about the esp32 now that the rmt is supported? Should be better than the esp8266 and you get BLE to control it with your smart phone.

@chad_steinglass LEDmatrix gives you the ability to draw circles, filled circles, lines, rectangles, filled rectangles, shift the entire display in any direction, and does a bunch of tricks in terms of taking a portion of the screen and pasting it back in elsewhere. relatively straightforward to use and matches up with FastLED seamlessly. Best of all, in simple applications (i.e. single lead) it figures out how to map the resulting matrix into a wide range of user defined led configurations. It does not know how to deal with multi pin output found in Octo… so I had to do my own mapping there to convert the 2d matrix into a 8 way output stream. I use some rather simple math to get that done. It took a while and a few beers to nail that down but it works now. This works for mapping a big matrix (32 x 32 or 64 x 64) into 16 x 16 panels (which need to be wired properly). ‘zeds’ is the xy matrix generated by LEDMatrix ( renamed from “leds” to not clash with the “leds” that was defined as part of the 8 pin octo output array.

void spititout() {
long me;// which octo pin am i
for (int row = 0; row < MATRIX_HEIGHT; row ++) {
for (int col = 0; col < MATRIX_WIDTH; col++) {
if (row % 2 == 0) //even
me = row * 16 + (col % 16) + int(col / 16) * 256 + int(row / 16) * 256;
else//odd
me = (row + 1) * 16 - (col % 16) + int(col / 16) * 256 + int(row / 16) * 256 - 1;
leds.setPixel(me, zeds(col, row).red >> 2, zeds(col, row).green >> 2, zeds(col, row).blue >> 2);// put zeds into leds

}

}
leds.show();
}

I do all the animations with math/code. The overall code is a loop that periodically picks a new pattern to run, and generates a few parameters to give that pattern a bit of randomness(how quickly colors change, the speed(s) that the elements move, what sort of tails the elements leave, how many of elements, a few style modifiers, and a moving center that is the basis for some animation elements and a few other items) and then allows that to progress. Color change is driver by a byte value that increments with every new frame.

While playing a given pattern, the flow is to fade the current matrix contents, paint new contents over top of that, then refresh the screen. I try not to design patterns that write to every pixel so that the elements leave tails that fade over time. The spiral is one that actually repaints the entire screen every frame so there are no tails.

@Mark_Estes That sounds straight forward enough - I’ll have to start dabbling with LEDMatrix! I’m not too worried about the mapping part - almost all of the things I make are wearables, and so the never have regular dimensions, so for every piece I build a lookup table and a simple function that takes X and Y inputs and spits out the correct index number in the LED array (also spitting out a “9999” value or something if that xy coordinate points to a void in my display). The lookup table takes a few minutes to build (I do it in excel and then save as a csv), but with a very irregular matrix and my wiring often being not contiguous due to the shape of what I’m doing, its far far easier than trying to do the mapping with an equation.

I’m not sure how the octo does multi pin output, but using FastLED’s parallel output as implemented, you still define the entire matrix as one array, with the size of that array being NUM_STRIPS*LEDS_PER_STRIP, rather than 8 separate ones.

I like the idea of painting only some pixels and fading the rest to leave tails!

If you don’t mind, I’d love to see some of your code using LEDMatrix functions! Do you have a github?

great job !! loving it

So freaking cool!

@chad_steinglass let me get the code cleaned up a bit and then I will be glad to share it. I could not get FastLED’s parallel output to play nice with LEDMatrix but was able to get it working when I move to the Octo code and teensy 3.2. Of course many of the things I did to get it working might have gotten that other combination working as well. I will never know.

the math shown above does not work for 64 x 64, working on it now.

here is the corrected code to map to a 64 by 64 matrix made from 8 pairs of 16 x 16 zigzag matrix. thus, 8 pins of data out.

void spititout() {
int me;
for (int row = 0; row < MATRIX_HEIGHT; row ++) {
for (int col = 0; col < MATRIX_WIDTH; col++) {
if (row % 2 == 0) //even
me = row * 16 + int(row / 32) * 1536 + (col % 16) + int(col / 16) * 512 ;
else//odd
me = (row + 1) * 16 + int(row / 32) * 1536 - 1 - (col % 16) + int(col / 16) * 512;
leds.setPixel(me, zeds(col, row).red >> 2, zeds(col, row).green >> 2, zeds(col, row).blue >> 2);
}
}
leds.show();
}