How to delete data on a microSD card (UNO, wireless SD shield): Is there a method to just erasing contents of a txt file w/o deleting the file itself? I'm not sure if there's any harm to deleting the actual file, if I'm going to recreate it later.
I found this post for erasing data via truncation
Just wondering if someone has a preference or good practice reasons for erasing card data vs deleting / recreating file.
The code used for deleting the txt file I successfully used is simply:
// include the SD library:
#include <SPI.h>
#include <SD.h>
// code
SD.remove("datalog.txt"); // delete the file if existed