Grazie Astrobeed, i tuoi consigli sono veramente preziossissimi
In questo momento però ho un'altro problema, sempre relativo a questo progetto, stò facendo alcune prove con la shield microSD della sparkfun, ed ho qualche problemino, con le librerie originali scaricate dal sito riesco ad utilizzare il programmino di test, che non fa altro che creare un file e scriverci su un valore ogni 1000 ms, e fin qui ok, ma se cerco di utilizzare altri esempi tipo il fat16info ottengo il seguente risultato:
FreeRam: 1281
type any character to start
card.init failed
SD error
errorCode: 1
errorData: 0
type any character to start
Ho pensato che fosse un problema dovuto alla libreria, e così ho tentato anche con le librerie sdfat, ma quando vado a lanciare il programma di esempio sdFatInfo, ottengo lo stesso identico risultato??
mentre con l'esempio sdfatwrite ottengo:
Type any character to start
error: card.init failed
SD error: 1,0
qualcuno ha qualche idea su come risolvere il problema??
Nel readme ho trovato questo:
SdFat assumes chip select for the SD card is the hardware SS pin. On a
168/328 Arduino this is pin 10 and on a Mega this is pin 53. If you are
using another pin for chip select you will need call
Sd2Card::init(sckRateID, chipSelectPin) with second parameter set to the
chip select pin.
If you have a shield like the SparkFun shield that uses pin 8 for chip
select you would change the line:
card.init(SPI_HALF_SPEED);
to
card.init(SPI_HALF_SPEED, 8);
in the SdFat examples.
You can also edit Sd2Card.h and change the default value for chip select.
Replace SS_PIN with the new value for chip select in the following definition.
ma non riesco a capire dove devo andare ad apportare le dovute modifiche, sempre che il problema sia questo??
Grazie a tutti per l'aiuto e per i tanti e preziosi consigli.