Tell us about yourself!

Complete Your Profile
  • DanR208 made the instructable 4x4x4 LED Cube (Arduino Uno)1 year ago
  • DanR208 commented on KyleTheCreator's instructable 4x4x4 LED Cube (Arduino Uno)1 year ago
    4x4x4 LED Cube (Arduino Uno)

    You need to create a function whitch flickers between each layers in very fast interval, which human eye cant see. Here is an example code:'int column[16]={23,18,32,16,22,5,33,17,21,14,25,15,19,27,26,1}; int layer[4]={13,12,4,2};int time = 500; int matrix[][16] = { {0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,}, {0,0,0,0, 0,1,1,0, 0,1,1,0, 0,0,0,0,}, {0,0,0,0, 0,1,1,0, 0,1,1,0, 0,0,0,0,}, {0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,}};void setup() {.....}void loop(){ turnOnMatrix(matrix, time);}void turnEverythingOff(){ for(int i = 0; i<16; i++){ digitalWrite(column[i], 1);} for(int i = 0; i<4; i++){ digitalWrite(layer[i], 0);} }void turnOnMatrix(int matrix[][16], int mlsc) /// mlsc == 1/4 of display time{ for(int i = 0; i < mlsc; i++){ for(int lay = 0; lay <...

    see more »

    You need to create a function whitch flickers between each layers in very fast interval, which human eye cant see. Here is an example code:'int column[16]={23,18,32,16,22,5,33,17,21,14,25,15,19,27,26,1}; int layer[4]={13,12,4,2};int time = 500; int matrix[][16] = { {0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,}, {0,0,0,0, 0,1,1,0, 0,1,1,0, 0,0,0,0,}, {0,0,0,0, 0,1,1,0, 0,1,1,0, 0,0,0,0,}, {0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0,}};void setup() {.....}void loop(){ turnOnMatrix(matrix, time);}void turnEverythingOff(){ for(int i = 0; i<16; i++){ digitalWrite(column[i], 1);} for(int i = 0; i<4; i++){ digitalWrite(layer[i], 0);} }void turnOnMatrix(int matrix[][16], int mlsc) /// mlsc == 1/4 of display time{ for(int i = 0; i < mlsc; i++){ for(int lay = 0; lay < 4; lay++){ turnEverythingOff(); digitalWrite(layer[lay], 1); for(int col = 0; col < 16; col++){ if(matrix[lay][col]==1){ digitalWrite(column[col], 0); } } delay(1); } }}'I hope you would understand what I wanted to say :]

    View Instructable »