-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help with Animating a virtual CRGBArray #7
Comments
Why do you need to use a look up table? |
Well, my project is a Flyboard Suit for a friend so my LEDs are stitched into a wetsuit. It would be sick to have some sprites and text flying across while he's in the air. I'm gonna see what i can get done tonight, just thought there was a better way to set up my LEDs (pointers maybe?) so that i didn't have to waste cycles in a for loop iterating one array into another. Cheers Aaron |
I presume you just have an 'int' array that translates from an X/Y to your actual LED with say 0's or -1 for LED's that don't exist? I did do a mask version of the library that allowed you to pass a bit mask of the valid leds in the matrix. So you could have irregular cutouts but the leds still had to be wired in sequence of the X/Y matrix but could have holes where leds were missed out. I never posted it though as I wasn't happy with the code/method and ended up surpassing it with the multiple matrix version. |
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.
The text was updated successfully, but these errors were encountered: