Pages: [1]   Go Down
Author Topic: Data Logging High frequency / long time...enormous file! Modify sketch  (Read 1498 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 216
Posts: 13664
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

Rob Tillaart

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

Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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 smiley 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.
Logged

Pages: [1]   Go Up
Jump to: