We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › I am making a multiple arduino data logger in p.
Page Index Toggle Pages: 1
I am making a multiple arduino data logger in p. (Read 1489 times)
I am making a multiple arduino data logger in p.
Apr 23rd, 2009, 7:38am
 
I am making a multiple arduino data logger in processing.
It saves the output as a comma seperated value csv file that is a text file with a different extension.
I am having it count and save the counted numbers to a text file...
This is to test how big tables open office , or mysql tables can handle...
Then I need statistics processing on thowse tables....
It is running very slow and does not work in windows when I export the aplication...? My sketch folder is the desktop.

Quote:
/**
 * SaveFile 2
 * 
 * This file a PrintWriter object to write data continuously to a file
 * while the mouse is pressed. When a key is pressed, the file closes
 * itself and the program is stopped. This example won't work in a web browser
 * because of Java security restrictions.
 */
int count1=0;
int count2=0;

PrintWriter output;

void setup()
{
  size(200, 200);
  // Create a new file in the sketch directory
  output = createWriter("positions.csv");
  frameRate(12);
}

void draw()
{
  count1++;
  count2++;
  
  output.println(count1 + "," + count2);
  
  if (mousePressed) {
    point(mouseX, mouseY);
    // Write the coordinate to a file with a
    // "," (comma character) between each entry
  }
}

void keyPressed() { // Press a key to save the data
  output.flush(); // Write the remaining data
  output.close(); // Finish the file
  exit(); // Stop the program
}



maby useing float as the tipe of number input is slowing it...
Page Index Toggle Pages: 1