Skip to main content
edited tags
Link
Michel Keijzers
  • 13k
  • 7
  • 42
  • 59
Source Link
tony gil
  • 378
  • 1
  • 7
  • 26

Arduino SD Card open file modes append / overwrite

Running Arduine IDE SD DataLogger Example, my data gets appended to a txt file.

File dataFile = SD.open("datalog.txt", FILE_WRITE);
if (dataFile) {
  dataFile.println(dataString);
  dataFile.close();
}

Is there an explicit option to open the file in overwrite / append modes?