user8262: i am working on this arduino project using processing. There are some sensor values which should be logged, but unfortunately my processing code rewrites the file after each cycle so that i get the last sensor value only. How do i prevent this from happening? I am using the ordinary method by the way. PrintWriter command followed by createWriter

user8033: PrintWriter pw = new PrintWriter(new FileOutputStream(
    new File("persons.txt"), 
    true /* append = true */));
The true is the append mode flag.
Also check if you're using 
pw.append(p.toString());
        pw.append("sdf");
https://stackoverflow.com/questions/8210616/printwriter-append-method-not-appending

8262: <p>i am working on this arduino project using processing. There are some sensor values which should be logged, but unfortunately my processing code rewrites the file after each cycle so that i get the last sensor value only. How do i prevent this from happening? I am using the ordinary method by the way. PrintWriter command followed by createWriter</p>
 8033: <p><code>PrintWriter pw = new PrintWriter(new FileOutputStream(
    new File("persons.txt"), 
    true /* append = true */));</code></p>

<p>The <code>true</code> is the append mode flag.
Also check if you're using </p>

<p><code>pw.append(p.toString());
        pw.append("sdf");</code></p>

<p><a href="https://stackoverflow.com/questions/8210616/printwriter-append-method-not-appending">https://stackoverflow.com/questions/8210616/printwriter-append-method-not-appending</a></p>
