Data Logging High frequency / long time...enormous file! Modify sketch

Hello Guys
I have a little question.
I'm making a simple data logger using the libraries SDFat
(downloaded from http://code.google.com/p/sdfatlib/downloads/detail?name=sdfatlib20111205.zip&can=2&q= ),
using the example called "AnalogLogger".
This sketch works fine for my requests. Unfortunately I collect data for long time, close to week and with high frequency up to 10 sample/min 10HZ, causing really big file after one week, and some problem when try to open with excel.

So, I would that after, for example 20000 millis or after 20000 sample, the system recreate new one logfile...
Anyone know how implement this function in this sketch??
thank you
roberto

  1. Add a counter and close the file after every 10000 samples.
  2. generate the filename partially from a second counter ==> think filename = "data" + counter + ".log" ; counter++; (this is not valid duino code)

eischifa:
This sketch works fine for my requests. Unfortunately I collect data for long time, close to week and with high frequency up to 10 sample/min 10HZ, causing really big file after one week, and some problem when try to open with excel.

Excel is not made for handling such big files :slight_smile: further more, it is no scientific programm. I guess you're using csv format?
Try to import it with Octave or Matlab. Works fine for me while importing tons of data.