1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Using sdfatlib CS pin defaults. SD.begin() returns success or failure.

This commit is contained in:
David A. Mellis
2010-11-20 13:50:45 -05:00
parent 6f0ea10600
commit d05a57af19
4 changed files with 16 additions and 15 deletions

View File

@ -6,7 +6,11 @@ void setup()
{
Serial.begin(9600);
Serial.print("Initializing SD card...");
SD.begin();
// On the Ethernet Shield, CS is pin 4.
if (!SD.begin(4)) {
Serial.println("failed!");
return;
}
Serial.println("done.");
f = SD.open("test.txt", true, false);