The reference for the SD library states to use the SD.open("filename", FILE_WRITE); when trying to read your SD card data back from the end of the file vice FILE_READ which starts from the beginning. I'm building a datalogger that writes to the file in the following format:
mm/dd/yy , hhmm , temp
It works great if I use FILE_READ, but will not read out the card at all if I use FILE_WRITE to open the file for a read operation
Also......since I would want it printed as above would I need to create them as strings so that the last string would be read out vice it just reading each piece of data from back to front creating a "backwards" printout. right now I just "filename.print" everything.
From the SD library reference page.........
Syntax
SD.open(filepath)
SD.open(filepath, mode)
Parameters
filename: the name the file to open, which can include directories (delimited by forward slashes, /) - char *
mode (optional): the mode in which to open the file, defaults to FILE_READ - byte. one of:
FILE_READ: open the file for reading, starting at the beginning of the file.
FILE_WRITE: open the file for reading and writing, starting at the end of the file.
Returns