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 › no screen command line run executable
Page Index Toggle Pages: 1
no screen command line run executable? (Read 713 times)
no screen command line run executable?
Apr 23rd, 2009, 10:19am
 
no screen command line run executable?...
I want to take values from the com port and write them to a csv file I tried it in the draw loop and it is horribly slow.
It is running not as a exported exacutable. But the exacutable doen't find the main in windows proably becaause I changed my sketch folder.
It does not need a screen or to wait for a draw.

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=1;
int count2=1;

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
}

Re: no screen command line run executable?
Reply #1 - Apr 23rd, 2009, 12:55pm
 
For your information, "Exhibition" sub-forum isn't to expose your problems, but to show your finished sketches.
That's two messages there that should have gone to some other sub-forum. Plus they are basically the same, showing the same code unrelated to your questions (no Arduino code?). Avoid redundancy too. Thanks.

I think these messages will be moved by a moderator anyway, but I thought I should inform you.
Page Index Toggle Pages: 1