Go Down

Topic: SdFat seek() and position() functions? (Read 1 time) previous topic - next topic



My project includes incoming data being processed and logged into an SD card, using the Arduino DUE.  Lets say I have a file.csv with entries looking like A,B,C,D (A,B are ints and C,D are floats).



Now after logging, I want to read the values of 'D' starting from the buttom going up towards the top of the file. 

I recieved advice regarding seek() and position() as it may help me to do exactly what to do, but <SD.h> is compiling issues with <SdFat.h>.  Because I want fast reads (50Hz), I do not want to use a while() to scroll down each time.  Seek() using pointers which is perfect for my application.

Are there seek() and position() functions in SdFat?
Any other suggestions?

Dialup is the future.


If there is not to much data in the file, why dont you read the whole file into an array and read that in reverse.

If you use sdfat.h than you better not use SD.h as the latter is more convenience level SD handling (IIRC) and the SDFat is for more detailed control.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


Either use one library or the other.

My choice is for sdfat as it is more stable and gerenrally works faster.

The functions you are looking for exist and are very well documented in the sdfat documentation.
Arduino Libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com
Arduino++ blog https://arduinoplusplus.wordpress.com

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131