Fotos desde o inicio da montagem ate o finalPrimeiros passos, montagem do cubo 2x2x2 e 3x3x3Cubo 2x2x2Cubo 3x3x3Soldando camadas do cubo 7x7x7Camada do cubo 7x7x7Soldando entre si, as camadas do cubo 7x7x7Cubo 7x7x7 Testando todos os 343 LEDsFoi necessario testar varias vezes TODOS os LEDsSoldando os fios nas colunas do cubo 7x7x7Cortando e descascando os fiosTestando novamente os LEDsLigando os fios do cubo 7x7x7Acredite, atras dessa floresta de fios, esta o cubo 7x7x7Circuito melhorado com a diminuicao do volume dos fiosCortando madeira para a caixaColando a caixaFazendo caixa de acetato para proteger o cuboTestando cubo 7x7x7O pouco do material que sobrouPrototipo da versao do programa criador de frames de um cubo 7x7x7 Apresentacao Final View more PowerPoint from ardeoino Apresentacao Intermediaria 2View more presentations from ardeoino. #include <avr/pgmspace.h> // allows use of PROGMEM to store patterns in flash#define CUBESIZE 7#define PLANESIZE CUBESIZE*CUBESIZE#define PLANETIME 3333 // time each plane is displayed in us -> 100 Hz refresh#define TIMECONST 20 // multiplies DisplayTime to get ms - why not =100?prog_uchar PROGMEM PatternTable[] = {B1111111, B0000000, B1000001, B1100011, B1010101, B1001001, B0000000,10,B1111111, B0000000, B1000001, B1100011, B1010101, B1001001, B0000000,10,B1111111, B0000000, B1000001, B1100011, B1010101, B1001001, B0000000,10,B1111111, B0000000, B1000001, B1100011, B1010101, B1001001, B0000000,10,B1111111, B0000000, B1000001, B1100011, B1010101, B1001001, B0000000,10,B1111111, B0000000, B1000001, B1100011, B1010101, B1001001, B0000000,10,B1111111, B0000000, B1000001, B1100011, B1010101, B1001001, B0000000,10, };/*** Defining pins in array makes it easier to rearrange how cube is wired ** Adjust numbers here until LEDs flash in order - L to R, T to B ** Note that analog inputs 0-5 are also digital outputs 14-19! ** Pin DigitalOut0 (serial RX) and AnalogIn5 are left open for future apps *///int LEDPin[] = {16, 3, 1, 15, 4, 6, 14, 5, 7};int LEDPin[] = {0,1,2,3,4,5,6};//int PlanePin[] = {19, 18, 17};int PlanePin[] = {12,13,14,15,16,17,18};int decodificador[]={8,9,10};// initializationvoid downClock(int valor){ int binario[3], j=0, i=0, resto=0; for(j=2; j>=0;j--){ resto=valor%2; valor=valor/2; printf("%d\n",resto); binario[j]=resto; } for(i=0; i<3;i++){ digitalWrite(decodificador[i],binario[i]); } }void upClock(){ digitalWrite(16,HIGH); digitalWrite(17,HIGH); digitalWrite(18,HIGH);}void limpaFlip(){ int i=0; for(int j=1;j<=7;j++){ digitalWrite(PlanePin[j],LOW); for(i=0; i<7;i++){ digitalWrite(LEDPin[i],LOW); } upClock(); downClock(j); } } void setup(){ int pin; // loop counter // set up LED pins as output (active HIGH) for (pin=0; pin<PLANESIZE; pin++) { pinMode( LEDPin[pin], OUTPUT ); } // set up plane pins as outputs (active LOW) for (pin=0; pin<CUBESIZE; pin++) { pinMode( PlanePin[pin], OUTPUT ); }}// display pattern in table until DisplayTime is zero (then repeat)void loop(){ // declare variables byte PatternBuf[ PLANESIZE ]; // saves current pattern from PatternTable int PatternIdx; byte DisplayTime; // time*100ms to display pattern unsigned long EndTime; int plane; // loop counter for cube refresh int patbufidx; // indexes which byte from pattern buffer int ledrow; // counts LEDs in refresh loop int ledcol; // counts LEDs in refresh loop int ledpin; // counts LEDs in refresh loop // Initialize PatternIdx to beginning of pattern table PatternIdx = 0; // loop over entries in pattern table - while DisplayTime>0 //limpaFlip(); do { memcpy_P( PatternBuf, PatternTable+PatternIdx, PLANESIZE ); PatternIdx += PLANESIZE; DisplayTime = pgm_read_byte_near( PatternTable + PatternIdx++ ); EndTime = millis() + ((unsigned long) DisplayTime) * TIMECONST; // loop while DisplayTime>0 and current time < EndTime while ( millis()