File tree Expand file tree Collapse file tree 2 files changed +17
-12
lines changed Expand file tree Collapse file tree 2 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,14 @@ void setup() {
34
34
Serial.print (" Initializing SD card..." );
35
35
36
36
if (!SD.begin (4 )) {
37
- Serial.println (" initialization failed!" );
37
+ Serial.println (" initialization failed. Things to check:" );
38
+ Serial.println (" 1. is a card inserted?" );
39
+ Serial.println (" 2. is your wiring correct?" );
40
+ Serial.println (" 3. did you change the chipSelect pin to match your shield or module?" );
41
+ Serial.println (" Note: press reset or reopen this serial monitor after fixing your issue!" );
38
42
while (1 );
39
43
}
44
+
40
45
Serial.println (" initialization done." );
41
46
42
47
// open the file. note that only one file can be open at a time,
Original file line number Diff line number Diff line change @@ -41,17 +41,17 @@ class SdVolume;
41
41
// SdFile class
42
42
43
43
#ifdef O_RDONLY // ARDUINO_ARCH_MBED
44
- #undef O_READ
45
- #undef O_RDONLY
46
- #undef O_WRITE
47
- #undef O_WRONLY
48
- #undef O_RDWR
49
- #undef O_ACCMODE
50
- #undef O_APPEND
51
- #undef O_SYNC
52
- #undef O_CREAT
53
- #undef O_EXCL
54
- #undef O_TRUNC
44
+ #undef O_READ
45
+ #undef O_RDONLY
46
+ #undef O_WRITE
47
+ #undef O_WRONLY
48
+ #undef O_RDWR
49
+ #undef O_ACCMODE
50
+ #undef O_APPEND
51
+ #undef O_SYNC
52
+ #undef O_CREAT
53
+ #undef O_EXCL
54
+ #undef O_TRUNC
55
55
#endif
56
56
57
57
// flags for ls()
You can’t perform that action at this time.
0 commit comments