I am wanting to map my LED layout in a linear fashion even though it isn't. I can use a 'struct' but was wondering if anyone has a better idea. I want to wire my LEDs in a zig-zag pattern so that in the future I can use the VideoDisplay sketch but for now I'm just sending color data to each LED.
For example:
I have 150 LEDs in a strand but they zig-zag.
0 - 49
99 - 50
100 - 149
I want to map them so that they are referenced to me in a linear fashion. 0 - 49 99 - 50 100 - 149 would look to me like 0 - 149.
I could use
struct LEDs
{
byte led0 = 0;
byte led1 = 1;
//and so on
byte led99 = 50;
byte led100 = 51;
}
I want to use the OctoWS2811 library to with this so I need to be able to iterate through the struct.
Is there a better way than a 'struct'? I was hoping something that doesn't use so much memory.
Thanks in advance,
Steve
For example:
I have 150 LEDs in a strand but they zig-zag.
0 - 49
99 - 50
100 - 149
I want to map them so that they are referenced to me in a linear fashion. 0 - 49 99 - 50 100 - 149 would look to me like 0 - 149.
I could use
struct LEDs
{
byte led0 = 0;
byte led1 = 1;
//and so on
byte led99 = 50;
byte led100 = 51;
}
I want to use the OctoWS2811 library to with this so I need to be able to iterate through the struct.
Is there a better way than a 'struct'? I was hoping something that doesn't use so much memory.
Thanks in advance,
Steve