Thanks for the replies.
I moved the myPort line into setup, and change the serial list to explicitly say “COM5” instead of Serial.list()[0].
Serial myPort;
void setup() {
myPort = new Serial(this, "COM5", 9600);
The port gives me just nulls if I use println(myPort.readString()), and if I do println(myPort.read()) it outputs lots of -1’s. Obviously I get a NPE if I try to convert the null into a float for use in the graph, but the -1 goes fine and i just get a straight line.
Arduino IDE Serial Monitor
