Ok… so the previous posts of mine were interesting, but now i think its going to get complicated…
in the top section, this is the current setup. the leds are looped around in a cube format so 1 is left, 2 is front, 3 is right, 4 is back, 5 is top and 6 is bottom.
i have working code to get the side leds (horizontal) when the cube is in place.
now im working on the vertical, and im not sure what to call the other one, sidevertical i guess… y is done, x and z to do…
and thinking forward, is the bottom more final setup.
now before i proceed on, i was thinking how i can make this work in the next section, and was going to use the xy matrix (but lots of them) and then use this code to link… but before i go on, i was wondering if there was a simpler / more obvious way?
i havent wired the main thing up, so its open to any physical change / layout!
the beautifully working code i already have (which i am actually quite proud of… :: LOL ::)
i guess its a little cheaty, as i created a 2d array, with the relevant positions in order.
byte sideState[6][4] = {
{4, 6, 2, 5}, // 1 0,1
{5, 1, 6, 3}, // 2 2,3
{5, 2, 6, 4}, // 3 4,5
{3, 6, 1, 5}, // 4 6,7
{4, 1, 2, 3}, // 5 8,9
{3, 2, 1, 4} // 6 10,11
};
// assignSideLeds
int g = 0;
for (int i = 0; i < NUM_SIDES; i++) {
for (int j = 0; j < NUM_LEDS_IN_SEGMENT; j++) {
sideLeds2[g] = ((sideState[state - 1][i] * NUM_LEDS_IN_SEGMENT) - NUM_LEDS_IN_SEGMENT) + j;
g++;
}
}

