Hello, I'm trying to use 4 NeoPixel matrixes (height = 42,

Hello,

I’m trying to use 4 NeoPixel matrixes (height = 42, width = 12 pixels) in a vertical arrangement combined with noise coming from fill_2dnoise16(). If I use just one matrix everything looks good. How should I configure it so it shows the generated noise array spanning those 4 matrixes? It will result in a 168 x 12 pixels (that is 2016 pixels) array.

I have tried using some of the examples for LedMatrix but no luck so far. Cloning one tile is possible just using one pin for each tile, as this:

LEDS.addLeds<WS2812B,A0,GRB>(leds,NUM_LEDS);
LEDS.addLeds<WS2812B,A1,GRB>(leds,NUM_LEDS);
LEDS.addLeds<WS2812B,A2,GRB>(leds,NUM_LEDS);
LEDS.addLeds<WS2812B,A3,GRB>(leds,NUM_LEDS);

Using one data pin for each matrix is desirable because the wiring is already done that way but if the way to go is to have serial data flowing into each matrix from one pin I could rearrange my wiring.

I’m using an Arduino Mega 2560 and the latest FastLED cloned from its Git repository.

Any help will be really appreciated.

  • Felix

fill_2dnoise16 assumes a single matrix with either a regular grid layout or a seprentine layout. However, using 4 matrixes like you have adds another juggle to things - because what you have is a matrix of matrixes.

So, one way to do it would be to call fill_2dnoise16 4 times, once for each matrix - adjusting the x/y and huex/huey values passed in to fill_2dnoise16 accordingly.

Another possibility would be to look at the code for fill_2dnoise16 or the simpler code in https://github.com/FastLED/FastLED/tree/master/examples/Noise and do your own iterating over the leds/computing noise values for each cell.