mmp131316
Junior Member level 1
Hello everybody i am trying to use chip kit max32 with the sd card shield (this is the shield https://www.sparkfun.com/tutorials/172)
I am making the following connections
chip kit sd shield
pin 50 - pin 12
pin 51 - pin 11
pin 52 - pin 13
pin 53 - pin 4
and pin 10 from the chip kit is connected to the pin 10 from the shield
and of course the vcc from 3.3 v from chip kit to the shields 3.3 v and the ground also
With this configuration and the following code I am receiving the initialization failed message
Please give any suggestions regarding why does this work properly !
Thanks for your time. Cheers ;-)
I am making the following connections
chip kit sd shield
pin 50 - pin 12
pin 51 - pin 11
pin 52 - pin 13
pin 53 - pin 4
and pin 10 from the chip kit is connected to the pin 10 from the shield
and of course the vcc from 3.3 v from chip kit to the shields 3.3 v and the ground also
With this configuration and the following code I am receiving the initialization failed message
Code:
/*
#include <SD.h>
File myFile;
void setup()
{
Serial.begin(9600);
Serial.print("Initializing SD card...");
pinMode(10, OUTPUT);
if (!SD.begin(53)) {
Serial.println("initialization failed!");
return;
}
Serial.println("initialization done.");
// open the file. note that only one file can be open at a time,
// so you have to close this one before opening another.
myFile = SD.open("test.txt", FILE_WRITE);
// if the file opened okay, write to it:
if (myFile) {
Serial.print("Writing to test.txt...");
myFile.println("lala th city guy.");
// close the file:
myFile.close();
Serial.println("done.");
} else {
// if the file didn't open, print an error:
Serial.println("error opening test.txt");
}
// re-open the file for reading:
myFile = SD.open("test.txt");
if (myFile) {
Serial.println("test.txt:");
// read from the file until there's nothing else in it:
while (myFile.available()) {
Serial.write(myFile.read());
}
// close the file:
myFile.close();
} else {
// if the file didn't open, print an error:
Serial.println("error opening test.txt");
}
}
void loop()
{
// nothing happens after setup
}
Thanks for your time. Cheers ;-)