Hi,
I'm trying to use an SDCard as a datalogger. I can write to the card using the sample. I want to append the data and for that I'm using a 4 byte header in the file. It seems that when I want to update the header after a logging session all the data is missing from the file as well.
What am I doing wrong:
...
rc = FatFs.open("T_WRITE.TXT");
if (rc) die(rc);
char buffer[4];
rc = FatFs.read(buffer, sizeof(buffer), &br); /* Read a chunk of file */
if (rc || !br) die(rc); /* Error or end of file */
for (uint16_t i = 0; i < br; i++){
fileIndex.myByte[i]=buffer[i