si venivano salvati lì, però li ho sempre caricati direttamente dall'ide, quindi non mi ero posto il problema, anche perchè usando questo pc che è di mio padre cerco di tenere i miei file su un lato del desktop per non mischiarli neanche visivamente con i suoi
comunque ho fatto un piccolo passo in avanti, per un istante, quando faccio partire il programma, il punto del display centrale si accende, proverò a cambiare i collegamenti dei digit (i gnd dei display giusto?) del max
Aggiornamento:
Sono riuscito ad accenderli! Ho usato questo codice
//We always have to include the library
#include "LedControl.h"
/*
Now we need a LedControl to work with.
***** These pin numbers will probably not work with your hardware *****
pin 12 is connected to the DataIn
pin 11 is connected to the CLK
pin 10 is connected to LOAD
We have only a single MAX72XX.
*/
LedControl lc=LedControl(12,11,10,1);
/* we always wait a bit between updates of the display */
unsigned long delaytime=250;
void setup() {
/*
The MAX72XX is in power-saving mode on startup,
we have to do a wakeup call
*/
lc.shutdown(0,false);
/* Set the brightness to a medium values */
lc.setIntensity(0,8);
/* and clear the display */
lc.clearDisplay(0);
}
/*
This method will display the characters for the
word "Arduino" one after the other on digit 0.
*/
void writeArduinoOn7Segment() {
lc.setChar(0,0,'a',false);
delay(delaytime);
lc.setRow(0,0,0x05);
delay(delaytime);
lc.setChar(0,0,'d',false);
delay(delaytime);
lc.setRow(0,0,0x1c);
delay(delaytime);
lc.setRow(0,0,B00010000);
delay(delaytime);
lc.setRow(0,0,0x15);
delay(delaytime);
lc.setRow(0,0,0x1D);
delay(delaytime);
lc.clearDisplay(0);
delay(delaytime);
}
/*
This method will scroll all the hexa-decimal
numbers and letters on the display. You will need at least
four 7-Segment digits. otherwise it won't really look that good.
*/
void scrollDigits() {
for(int i=0;i<13;i++) {
lc.setDigit(0,3,i,false);
lc.setDigit(0,2,i+1,false);
lc.setDigit(0,1,i+2,false);
lc.setDigit(0,0,i+3,false);
delay(delaytime);
}
lc.clearDisplay(0);
delay(delaytime);
}
void loop() {
writeArduinoOn7Segment();
scrollDigits();
}
anche se ho notato che ruotando il resistore lineare che ho collegato al gnd del maxim si modifica la velocità e un attimo dopo si interrompe la "riproduzione" e devo resettare l'arduino per farlo riprendere. Per ora si accendono i display ma vengono visualizzati simboli senza senso che cambiano a velocità elevata
credo che, oltre a dedicare del tempo allo sketch, il problema risieda nei digit che ora come ora sono collegati senza tenere conto dell'ordine
p.s. sto cominciando a sospettare di avere dei contatti allentati nella breadboard
Aggiornamento2:
ho tolto tutti i contatti di due display e mi sono dedicato ad uno solo, ho sostituito il resistore lineare con uno fisso, ho modificato i collegamenti sui pin segmento ed ora tutti i simboli sono comprensibili e corretti. sto usando una versione " mutilata" del precedente codice per fare delle semplici prove, ma non capisco perchè la cifra lampeggi nonostante abbia modificato i delay
//We always have to include the library
#include "LedControl.h"
/*
Now we need a LedControl to work with.
***** These pin numbers will probably not work with your hardware *****
pin 12 is connected to the DataIn
pin 11 is connected to the CLK
pin 10 is connected to LOAD
We have only a single MAX72XX.
*/
LedControl lc=LedControl(12,11,10,1);
/* we always wait a bit between updates of the display */
unsigned long delaytime=1000;
void setup() {
/*
The MAX72XX is in power-saving mode on startup,
we have to do a wakeup call
*/
lc.shutdown(0,false);
/* Set the brightness to a medium values */
lc.setIntensity(0,8);
/* and clear the display */
lc.clearDisplay(0);
}
/*
This method will display the characters for the
word "Arduino" one after the other on digit 0.
*/
void writeArduinoOn7Segment() {
lc.setChar(0,0,'4',false);
delay(delaytime);
lc.clearDisplay(0);
;
}
void loop() {
writeArduinoOn7Segment();
}