// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
// Note that even if it's not used as the CS pin, the hardware SS pin
// (۱۰ on most Arduino boards, 53 on the Mega) must be left as an output
// or the SD library functions will not work.
pinMode(53, OUTPUT);
Serial2.print("test/...txt\n----------------------------------\n\n");
Serial2.print("Initializing SD card = ");
//Initialization SD With Pin53
if (SD.begin(53) == false)
Serial2.println("SD Failed!");
else
{
Serial2.println("SD Done.");
}
if (SD.exists("test") == false) // Directory is Not Exis
{
if (SD.mkdir("test") == true) // Create Directory is Success
{
//Serial.println("The Directory test is Created.");
}
else // Create Directory is Not Success
Serial2.println("The Directory test is Not Created.");
}


4 لایک
LinkBack URL
About LinkBacks



پاسخ با نقل قول