Processing Forum
import processing.serial.*; Serial myPort; // The serial port: String inString; // Input string from serial port: int lf = 10; // ASCII linefeed void setup() { size(400,200); myPort = new Serial(this, Serial.list()[0], 9600); myPort.bufferUntil(lf); } void draw() { background(0); text("received: " + inString, 10,50); Works fine with this alone
//float a = float(inString); make the NullPointerExeception WHY??????
} void serialEvent(Serial p) { inString = p.readString(); }
Regards Fuzz