[ASK] Data Logger Output 1 File Per Day

Hello arduino user, introduce me, akbarifkie, from Indonesia..
I'm new user in this forum, I do interest with arduino..
Right now, I have project to create Data Logger base on arduino, and the output file is CSV which will create new CSV file after 8000+ data stored on SD Card.
Now I want to re-program Data Logger, so Data Logger can save 1 full data per day, and file named with date which when data save..
The data logger need to saved electrical data from Wind Turbine and Solar Panel, to Renewable Energy.
I do apreciate your help, thanks before, and sorry for my bad English.

Please do not cross-post. Other thread removed.

I think you need to add a real-time clock. This will enable you to do three things

  1. record the time as well as the data

  2. use the date as a file name

  3. create a new file every day

Hi

Have a look at my Arduino application at http://www.2wg.co.nz/. In the ACTIVITY, CRAWLER and CATWEAZLE folders you will find that I am writing daily log files.

I do not keep the files open all day and roll over the filename at midnight each day. I just dynamically calculate today's filename when required and then open (or create) the file and write the additional log/activity data to it and then close the file again.

I do not have a real time clock (RTC) in my system but have implemented a clock using internet time and daily updates using UDP NTP calls.

Within my utility.cpp library there are a number of clock/date/time functions. Within the main HA*.ino sketch you will find examples or how to name files in YYMMDD.txt format. You will even see examples of how to use sub folders so you never get too many files in one SD card folder AND so you can easily access recent files.

The full source code for my application is published in the PUBLIC directory of the SD card web page - you can download all the files include the overview.pdf documentation. If you have ethernet functionality you might also implement an SD card web page that you can browse remotely and do file downloads from.

I hope this helps.

Catweazle NZ.