Go Down

Topic: SD card file naming (Read 2 times) previous topic - next topic


I would like to set up the arduino to write to a new file for each reading.

Why? A new file per day I'd understand. One file for all readings, time stamped, I'd understand.

One file, one reading, I don't.


Oct 12, 2012, 02:13 am Last Edit: Oct 12, 2012, 02:23 am by aurelius Reason: 1

I would like one file, one reading and the date and time stamp to correlate DO to brix in a fermenting barrel of wine. The user defined number will be the 5 digit barrel number. We're looking to see with a few hits of oxygen from a stone at different intervals affects the rate of fermentation and temperature. I'm looking for an easy way to differentiate the different times we hit each barrel with O2. Since I can't use more than 8 characters for the file name, I'm thinking of adding a letter to the end of the number sequence to denote the time sequence. This however, runs into the problem that I would need to write out the letter to keep track of which is next in the sequence. If I'm doing that, I might as well write down the time and date as well on a paper list & rename the files to the format I originally suggested once on the computer. That is just more work, and I think there could be a more elegant solution that isn't causing me to spend a bunch of time cross referencing that paper list.


If you are using sdfatlib, rather than the cut down version (SD.h) supplied with the IDE, you can update the timestamp on files, but you will need to maintain the time within your sketch, either with an RTC, or using the software-only Time library functions.


Go Up