Grafico con processing

ciao a tutti, sto provando a creare un grafico con processing dalla temperatura rilevata da arduino nel piedino analogico A0. La porta seriale che sto usando per arduino è la COM42. lo scrivo tutto, faccio run e mi esce questo:

expecting RPAREN, found 'Serial'

mi esce questo errore ma non capisco cosa mi indichi;
mi segnala questa riga di codice:

myPort = new Serial(this,"COM42" Serial.list()[0], 9600);

qualcuno di voi saprebbe dirmi come risolvere?

vi scrivo qui l'intero codice:

import processing.serial.*;

Serial myPort;        // The serial port
int xPos = 1;         // horizontal position of the graph

void setup () {
// set the window size:
size(400, 300);        

// List all the available serial ports
println(Serial.list());
// I know that the first port in the serial list on my mac
// is always my  Arduino, so I open Serial.list()[0].
// Open whatever port is the one you're using.
myPort = new Serial(this,"COM42" Serial.list()[0], 9600);
// don't generate a serialEvent() unless you get a newline character:
myPort.bufferUntil('\n');
// set inital background:
background(0);
}
void draw () {
// everything happens in the serialEvent()
}

void serialEvent (Serial myPort) {
// get the ASCII string:
String inString = myPort.readStringUntil('\n');

if (inString != null) {
// trim off any whitespace:
inString = trim(inString);
// convert to an int and map to the screen height:
float inByte = float(inString); 
inByte = map(inByte, 0, 1023, 0, height);

// draw the line:
stroke(127,34,255);
line(xPos, height, xPos, height - inByte);

// at the edge of the screen, go back to the beginning:
if (xPos >= width) {
xPos = 0;
background(0); 
} 
else {
// increment the horizontal position:
xPos++;
}
}
}

Ti invitiamo a presentarti (dicci quali conoscenze hai di elettronica e di programmazione) qui: Presentazioni
e a leggere il regolamento: Regolamento

Non ha senso quella riga:

myPort = new Serial(this,"COM42" Serial.list()[0], 9600);

o scrivi

myPort = new Serial(this,"COM42", 9600);

oppure

myPort = new Serial(this,Serial.list()[0], 9600);

Nel primo caso hai una porta fissa, nel secondo caso la porta numero 0 nella lista delle porte disponibili.

Scusa, ma controllare il comando sul sito/forum di Processing ?

grazie mille, ho visto tutti i link e ti ringrazio ancora.

scusami ma non mi era venuto in mente di controllare lì.
grazie ancora.