We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, another small issue again. Each time the sensor reads a value, it stores it in a txt file but the file is rewritten in every cycle, so at the end what i get is the last sensor info and not the entire summary.. Some helps.. Please.. (i am new to this whole programming world by the way.. :-D)
Answers
Might try dumping the sensor values in an StringList, then have the StringList write to a file.
The sensor values are read in a loop, how do you suggest i dump it to a stringlist. Wouldn't it get reset once when the loop starts again?
How about saving your logs in separate files named w/ current time stamp? :D
GoToloop, sorry for the delay.. But i couldn't understand much from that code. Which variable holds the sensor data? Like the serial rfid reader data? (please, do forgive me for my lack of knowledge.. I am just learning you know.. :-D
It simply generates a stamp name based on current time & date to be used to save your log files.
Just a silly idea to avoid overwriting the same filename! O:-)
As lifelike said, you can read the previous file in an ArrayList, append the new values, then save the content of the list. That's the simplest way.
GoToLoop' solution can work, but you will end with lot of files!
Yup.. I saw that.. But i can't actually implement such a code with my present understanding of processing.. I think i will go along with GoToloop's method..