Ok so this may be a silly question but this is still going over

Ok so this may be a silly question but this is still going over my head. Im trying to set up and LED array of 112 LEDS in 4 segments of 28 running off of 4 different data lines. I found on the wiki how to set up all 4 strips as 1. But how can i declare a matrix off of that? The LEDS are setup like this

Could you post a better photo? I can’t read the numbers on this one…

The heck? I wonder why its pixelated

missing/deleted image from Google+

@Jeremy_Spencer are you able to see that one?

One way to do it, is to make an array lookup table. Its pretty easy to do, but not the best use of memory. If you are using a teensy 3.2 or ESP8622 you should be fine. A mega should work too.

Using the graph paper makes this very simple. For the purpose of clarity, I am going to refer to your LED segments as North, East, South and West. North values are good to go. Add 28(281) to East values, add 56(282) to South values, and add 84(28*3) to West values. I recommend you remake your graph paper drawing with these new values.

After you have all of that completed, fill in all of the blank spaces in your 19x19 grid with a value outside the range of your LEDs, for example 113.

Now at the top of your code create an array of uint8_t and copy the values from your graph paper into a comma separated array. This will be your look up table.

Now, let’s say you want to apply noise using the NoisePlusPalette sketch. Inside the mapNoiseToLEDsUsingPalette() function add two bits of code. First, check to see if the noise grid location corresponds to an actual LED. Use an if statement and look up the x,y location in the noise to your lookup table. If the value is less than 113 then you have an actual pixel and it is worth doing all the remaining math, otherwise skip to the next noise value. The next thing is to add a line like this:

uint8_t lookupTable_led = lookupTable[(i*kMatrixWidth)+j);
leds[lookupTable_led] = color;

That should be enough to get you rolling. Let me know if you need more help and I can send along some code when I get home. Cheers, Matt

If the adafruit library works for your LEDs, they’ve already done the work for you with their Neomatrix lib. See examples I wrote: http://marc.merlins.org/perso/arduino/post_2017-04-24_Adafruit-GFX-on-NeoMatrix-and-RGB-Matrix-Panel-Demo.html
It’s too bad that the neomatrix lib doesn’t work with fastled…

@Matt_Richard awesome ill give that a shot! :slight_smile:

I put the layout into Excel and then use a VisualBasic routine to build a lookup table. I usually build one table for horizontal patterns and one for vertical patterns. This is fast but less flexible.

have a read of this and download the spreadsheet http://www.elec-tron.org/?page_id=1351

It depends on your animation. If you want to make a 2D graphic (like a noise field) you have to make a lookup map as described. If you want some more or less simple run-along-the-snowflake animation, that would be unnecessary or even over complicated.

Anyway, it’s just 118 pixel. I’d just make a single strip on one pin. It will be fast enough an makes the design simple.

@Thomas_Runge I don’t want to hijack this thread, but what you mention as simple, is exactly what I’m looking to accomplish, using WS2811 to make a couple different christmas projects. (20x18) I’ve been pouring over this group and github, but I haven’t found a simple example. Do you suggestions on resources?

@Thomas_Runge there are so many gaps i need to jump with regular wire to carry data from 1 segment of LEDs to the next. I rather keep the data lines as short as possible so data will get there properly :slight_smile:

@Ian_Jackson : look at Christians drawing. It’s a snow flake. Look at his numbers, they are the same for every branch. So just let the same simple 1D anim run through all numbers of all branches simultaneously. Quite easy and makes nice effects for christmas.

Got all 4 pin cooperating as 1 strip :slight_smile: now to make it a matrix (im still missing 1 of the arms but my printer is occupied)
missing/deleted image from Google+

Very nice looking