Skip to content

Help with Animating a virtual CRGBArray #7

@mozzhead164

Description

@mozzhead164

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions