fezder
Well-Known Member
Yeah, I too thinked It's similar since It's "only" 3-matrix after all.
I didn't draw schematic, but I can if It's REALLY needed, but there's huge chore, but hopefully these'll give enough info:
'Same way as earlier in matrix, but this time each layer x-y axes are controlled by 8 pc's of 74595's . Last shifter controls what layers are powered, by grounding them via darlington.

And code that allows to do something, manipulate whole matrix precisely what led is lit, so best thus far (did try to manipulate our, or yours , how you think it, 8x32 matrix no luck)
And Yes, mono-colour for now
....argh, forgot to comment relevant stuff, fixed now^
I didn't draw schematic, but I can if It's REALLY needed, but there's huge chore, but hopefully these'll give enough info:
'Same way as earlier in matrix, but this time each layer x-y axes are controlled by 8 pc's of 74595's . Last shifter controls what layers are powered, by grounding them via darlington.


And code that allows to do something, manipulate whole matrix precisely what led is lit, so best thus far (did try to manipulate our, or yours , how you think it, 8x32 matrix no luck)
C:
//test code for 8x8x8 cube
int dataPin = 2; //IC 14 //Define which pins will be used for the Shift Register control
int latchPin = 3; //IC 12
int clockPin = 4; //IC 11
#define data 2
#define latch 3
#define clock 4
//OE-GND
int buffer[8][9] = //each layer data stored as 8 times 8-bits [layer][data].
{ //layers, rows0,Rows1......Rows7
{B00000001, B00000000, B10000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000001},
{B00000010, B00000001, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000001},
{B00000100, B00000001, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000001},
{B00001000, B00000001, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000001},
{B00010000, B00000001, B10000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000001},
{B00100000, B00000001, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000001},
{B01000000, B00000001, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000001},
{B10000000, B00000001, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000001},
};
//int screen[8][9]; //screen data, both what layer is on as well as layer data [layer][data], same as above but tidier....
//int power[8] = {1, 2, 4, 8, 16, 32, 64, 128}; //for layers on/off
long previousMillis = 0; // will store last time LED was updated
void setup()
{
DDRD = DDRD | B00011100;
/*
for (int i = 0; i < 8; i++)
{
screen[i][0] = power[i]; //fill first element of arrays with layer command
}
for (int i = 1; i < 9; i++)
{
screen[i][i] = 0; //fill rest elements zeros to clear out funny stuff
}
*/
}
void loop()
{
/*
unsigned long currentMillis = millis();
if (currentMillis - previousMillis > 2000)
{
previousMillis = currentMillis;
for (int n = 0; n < 8; n++)
{
for (int i = 1; i < 9; i++) //not from beginning since first element is for layer select!
{
screen[n][i] = random() % 255; //fill rest elements with dummy data
}
}
}
//delay(100);
*/
for (int i = 0; i < 8; i++) //first layers....
{
for (int n = 0; n < 9; n++) //.....then, whatever is waiting at layer elements
{
shiftOut(data, clock, MSBFIRST, buffer[i][n]); //used shfitOut for now, but bit-bang would give more freedom
}
latchup(); //time to show up cube
}
}
void latchup()
{
digitalWrite(latch, HIGH);
digitalWrite(latch, LOW);
}
And Yes, mono-colour for now
Last edited: