diff --git a/examples/ReadWrite/ReadWrite.ino b/examples/ReadWrite/ReadWrite.ino index d964668..1a9ba66 100644 --- a/examples/ReadWrite/ReadWrite.ino +++ b/examples/ReadWrite/ReadWrite.ino @@ -34,9 +34,14 @@ void setup() { Serial.print("Initializing SD card..."); if (!SD.begin(4)) { - Serial.println("initialization failed!"); + Serial.println("initialization failed. Things to check:"); + Serial.println("1. is a card inserted?"); + Serial.println("2. is your wiring correct?"); + Serial.println("3. did you change the chipSelect pin to match your shield or module?"); + Serial.println("Note: press reset or reopen this serial monitor after fixing your issue!"); while (1); } + Serial.println("initialization done."); // open the file. note that only one file can be open at a time, diff --git a/src/utility/SdFat.h b/src/utility/SdFat.h index e57974d..46b880b 100644 --- a/src/utility/SdFat.h +++ b/src/utility/SdFat.h @@ -41,17 +41,17 @@ class SdVolume; // SdFile class #ifdef O_RDONLY //ARDUINO_ARCH_MBED -#undef O_READ -#undef O_RDONLY -#undef O_WRITE -#undef O_WRONLY -#undef O_RDWR -#undef O_ACCMODE -#undef O_APPEND -#undef O_SYNC -#undef O_CREAT -#undef O_EXCL -#undef O_TRUNC + #undef O_READ + #undef O_RDONLY + #undef O_WRITE + #undef O_WRONLY + #undef O_RDWR + #undef O_ACCMODE + #undef O_APPEND + #undef O_SYNC + #undef O_CREAT + #undef O_EXCL + #undef O_TRUNC #endif // flags for ls()