Go Down

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


I need some coding help, and would appreciate any suggestions as to the feasibility of this idea and how to accomplish it.

I'm looking to incorporate a SD card to log disolved oxygen readings from an atlas scientific probe and breakout board. I would like to set up the arduino to write to a new file for each reading. I'm looking for a way in which I can have the file be named based on the date/time as well as a user defined 5 digit number. i.e. 2012.

I would like the date and time section of the file name to be set automatically, and use a rotary encoder to scroll through 0-9 and use the momentary switch to move to the next number in the user defined section. Once the last number is selected, pressing the momentary switch would begin logging.

As far as the SD card, I was looking at using the Parallex SD card adapter sold by Jameco (2082935), but am open to other options. Any guidance would be greatly appreciated.


I don't think any of the Arduino SD libraries support filenames that are not in 8.3 format.


ok, so I'm limited to 8. I suppose if the file has a date created stamp, it would have a time as well, and I could name the file simply the user defined number.


Someone else will have to confirm, but I don't think files are date/time stamped either. Generally, the Arduino doesn't have date/time information.


There is a function for time stamping the files - try a search for it. I've had a play with it an it seems to work. If you can't find it I think I have a copy saved at home.

I have a directory named with the date (20121011) and put my files, named with the time (132310.txt), in there.
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

Go Up