Hi , i have a big problem with my new Leonardo
im triying to use this SD shield
http://www.olimex.cl/product_info.php?products_id=698&product__name=Arduino_microSD_Shield
with this changes
and this code
#include <SPI.h>
#include <SD.h>
File myFile;
const int chipSelect = 8; //la microsd shield de MCI viene con el 8.
void setup ()
{
Serial.begin(9600);
//while (!Serial); // wait for serial port to connect. Needed for Leonardo only. tarjeta sd
pinMode(SS, OUTPUT);
if (!SD.begin(8, 11, 12, 13))
{
Serial.println("Tu tarjeta no esta, o algo se desoldo :[");
}
else
{
Serial.println("La tarjeta esta OK :]");
myFile = SD.open("test.txt", FILE_WRITE);
if(!myFile)
{
Serial.print("no puedo abrir el archivo :[");
}
else
{
myFile.println("Bienvenido a la estacion metereologica 0.2");
myFile.close();
}
}
}
void loop ()
{
if(SD.begin(8, 11, 12, 13))
{
myFile = SD.open("TEST.txt", FILE_WRITE);
Serial.println("We did it!");
myFile.close();
}
else
{
Serial.println("No busques donde no encontraras! no hay tarjeta :]");
}
delay(3000);
}
but i can go inside the if (if(SD.begin(8, 11, 12, 13)) , just one time ( i belive that some thinks is not working again after that but im not shure what can be)
anyone now if Leonardo change it in the last 3 months?
thanks in any case!