import processing.serial.*;
Serial myPort;
PrintWriter output;
void setup(){
size(320, 240);
//println( Serial.list() );
myPort = new Serial( this, Serial.list()[0], 115200);
myPort.clear();
output = createWriter("pic02.jpg");
}
void draw(){
while ( myPort.available () > 0 ) {
output.write(myPort.readString());
}
}
void keyPressed() {
output.flush();
output.close();
}
Serial myPort;
PrintWriter output;
void setup(){
size(320, 240);
//println( Serial.list() );
myPort = new Serial( this, Serial.list()[0], 115200);
myPort.clear();
output = createWriter("pic02.jpg");
}
void draw(){
while ( myPort.available () > 0 ) {
output.write(myPort.readString());
}
}
void keyPressed() {
output.flush();
output.close();
}