public void InitSerial(float portValue) { // initialize the serial port selected in the listBox println( "initializing serial " + PApplet.parseInt(portValue) + " in serial.list()"); // for debugging // grab the name of the serial port String portPos = Serial.list()[PApplet.parseInt(portValue)]; // initialize the port serial = new Serial(this, portPos, 115200); // read bytes into a buffer until you get a linefeed (ASCII 10): serial.bufferUntil('\n'); println("done init serial"); // initialized com port flag init_com = 1; }