I am a complete newbie to coding! I am lighting a trike using an Arduino Uno with Adafruit’s WS2801 LED strips. I have 3 strips put together and they are not in a standard matrix because of the way they needed to be attached to the trike. I would like the light effects to sweep from the front of the trike to the back of the trike. The first two pixels in the front of the trike are numbers 32 and 41 in the strip and the last three pixels in the back of the trike are numbers 0, 12 and 50. There are 20 rows in my matrix (see attached photo). Does anyone have any ideas how to group the pixels in order to create a matrix that I can use with the current FastLED effects?
If you don’t mind a little zig-zagging in your effects, a fairly easy way would be to create another array with the LED indexes in order left to right, front to back:
uint8_t physicalOrder = { 32, 41, 31, 33, 40, 42, … };
Then, you would just change any line with something like:
leds[i] = …
to:
leds[physicalOrder[i]] = …
If you’d prefer all of the LEDs that are in the same row to be the same color, one (more complex) way would be to create an XY map, similar to the RGBShades: https://github.com/macetech/RGBShades/blob/master/XYmap.h
@Catherine_Ricke I use XY maps for all my work, its more complex but very effective
Thanks, I finally managed to figure out how to create the matrix. Now, it is on to making pretty patterns!
I used xy map for an irregular matrix here: https://github.com/LmnoZ/BrightTop?files=1
It employs code for Bluetooth control but you can chop that out
I used the XY map as well although not because it’s an irregular shaped piece.
This piece is simply 3 squares. But because of its reduced led count and staggered spacing the over all display really benefited from it.
http://github.com/SigmazGFX/Simon_Says_Matrix_Door/blob/master/SimonMatrix.ino
I am having the hardest time making the RGB shades work for my application.
I cant even get to the point of custom design. Can someone maybe point me in the right direction?
I got all the led numbering and last_visible_led out of the way im pretty sure.
