Try this workaround, replace the following line
myFile.close(); system("rm /media/mmcblk0p1/testC.txt"); system("touch /media/mmcblk0p1/testC.txt"); myFile = SD.open("testC.txt", FILE_WRITE);
Thank you for the help and suggestion, but for what I am trying to do deleting and remaking the file will not work. What I am trying to do is to create a Ring Buffer. In that the contents of the file always remain intact and any new data always replaces the last know oldest data point in the file (FILO). In this way the file "Ring Buffer" can be used indefinitely and will never run out of space and will always contain a running history of all the data points.
My first attempt to do this was to us a file pointer to track the position of the next write location and when the file reaches a certain size the file pointer is reset back to the beginning of the file. Once this occurs the file pointer is then incremented by one and new data is stored at the location and the pointer is incremented again. This process would then continue until the end of the file is reached and the whole process would be repeated indefinitely. For the program I would also use the file pointer to be able to printout the data in chronological order. To do all of this I was relying on the SD "seek" function but it appears that it is not working correctly.
The ring buffer hasn't been ported to the Galileo yet. The function is defined in the libraries but it is empty I believe, that is why it compiles successfully, but it doesn't do anything.