How to generate a archive txt per day?

edited May 2015 in How To...

Hello, I'm working in a project that need make a report to use in a database. I have 3 sensors that send data for arduino, I get this data and make a archive txt for i use after, but the problem is that I need save one archive per day, and now i just wanna know save one archive for all days, and if i turn off the arduino and turn on again, it ll be overwrite the old report. Someone can help me?

Answers

  • Answer ✓

    I'm not really sure what you're asking- which part of this are you stuck on?

    You can check whether the file already exists and use a different name if it does, or you can schedule something to happen every X hours. It really depends on exactly what you're asking.

  • _vk_vk
    Answer ✓

    Perhaps you can load the archive content back into the program, append your new data, and save it again? Or, as @KevinWorkman suggests use date/time in/as the name of the archive, so it won't be overwritten.

  • Thx for help! Now i know what i need do. Have a nice day men!

  • edited May 2015

    @GoToLoop i tried implement your code in mine but is doesnt work now. Your code generate a location, but do note generete the archive, i changed .log to .txt, Im trying fix this now, but I still need say thx, now i have a nort to still working. *Im new in processing.

Sign In or Register to comment.