-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Hi, Nice work on the library!
I need help with setting up a custom array of LEDs
I have set up an XY matrix with a lookup table for my LEDs XY positions.
When i run MatrixExample1 using;
leds.SetLEDArray(&leds_real[0]); in setup,
which compiles and runs fine but is not mapped to my custom XY map layout,
I have tried setting up a virtual CRGBArray and then using
leds.SetLEDArray(&leds_virt[0]);
to map the matrix/sprites to a this array first, and then map that virtual to my 'real' LEDs using;
for (int y = 0; y < kMatrixHeight - 1; y++) {
for (int x = 0; x < kMatrixWidth; x++) {
uint16_t XYPos = suitLookUpTable[ (y * kMatrixWidth) + x];
if(XYPos > 0) { leds_real[XYPos-1] = leds_virt(x,y); }
}
}
But can't seem to get it working...
Is there anything obvious im missing here?
Should I SetLEDArray to my real LEDs and do the LookUpTable somewhere else?
Many Thanks for your time mate, really appreciate it.