Browse Source

Update comments, fixes #21

main
PaulStoffregen 4 years ago
parent
commit
731309bc07
6 changed files with 8 additions and 10 deletions
  1. +1
    -1
      examples/CardInfo/CardInfo.ino
  2. +2
    -3
      examples/Datalogger/Datalogger.ino
  3. +2
    -3
      examples/DumpFile/DumpFile.ino
  4. +1
    -1
      examples/Files/Files.ino
  5. +1
    -1
      examples/ReadWrite/ReadWrite.ino
  6. +1
    -1
      examples/listfiles/listfiles.ino

+ 1
- 1
examples/CardInfo/CardInfo.ino View File

// Open serial communications and wait for port to open: // Open serial communications and wait for port to open:
Serial.begin(9600); Serial.begin(9600);
while (!Serial) { while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect.
} }





+ 2
- 3
examples/Datalogger/Datalogger.ino View File

// Open serial communications and wait for port to open: // Open serial communications and wait for port to open:
Serial.begin(9600); Serial.begin(9600);
while (!Serial) { while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect.
} }




} }
} }


// open the file. note that only one file can be open at a time,
// so you have to close this one before opening another.
// open the file.
File dataFile = SD.open("datalog.txt", FILE_WRITE); File dataFile = SD.open("datalog.txt", FILE_WRITE);


// if the file is available, write to it: // if the file is available, write to it:

+ 2
- 3
examples/DumpFile/DumpFile.ino View File

// Open serial communications and wait for port to open: // Open serial communications and wait for port to open:
Serial.begin(9600); Serial.begin(9600);
while (!Serial) { while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect.
} }




} }
Serial.println("card initialized."); Serial.println("card initialized.");
// open the file. note that only one file can be open at a time,
// so you have to close this one before opening another.
// open the file.
File dataFile = SD.open("datalog.txt"); File dataFile = SD.open("datalog.txt");


// if the file is available, write to it: // if the file is available, write to it:

+ 1
- 1
examples/Files/Files.ino View File

// Open serial communications and wait for port to open: // Open serial communications and wait for port to open:
Serial.begin(9600); Serial.begin(9600);
while (!Serial) { while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect.
} }





+ 1
- 1
examples/ReadWrite/ReadWrite.ino View File

// Open serial communications and wait for port to open: // Open serial communications and wait for port to open:
Serial.begin(9600); Serial.begin(9600);
while (!Serial) { while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect.
} }





+ 1
- 1
examples/listfiles/listfiles.ino View File

// Open serial communications and wait for port to open: // Open serial communications and wait for port to open:
Serial.begin(9600); Serial.begin(9600);
while (!Serial) { while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
; // wait for serial port to connect.
} }





Loading…
Cancel
Save