Hello fat16lib,
thanks for the code, that is exactly what I need.
Unfortunately, it does not compile. I get:
SdFile was not declared in this scope
which refers to that portion:
bool openByDate(SdFile* file, uint8_t y, uint8_t m, uint8_t d) {
char name[] = "YYMMDD00.TXT";
fmt2d(name, y);
fmt2d(name + 2, m);
fmt2d(name + 4, d);
for (uint8_t n = 0; n < 100; n++) {
fmt2d(name + 6, n);
if (file->open(name, O_CREAT | O_EXCL |O_WRITE)) return true;
}
return false;
}
What is missing? I use the IDE 1.6.4., and the SdFat lib works in general.
Thank for any hint.