这段代码在Processing 2中无问题,但是在Processing 3中使用size()函数的变量不起作用,我该如何在Processing 3中实现displaywidth-100?
int val, screen_increment, old_x=0, old_y=0;
String inString;
int lf = 10;
void setup()
{
size(displayWidth-100, 600);// The screen height is set to be 600, which matches the scaled data,
String portName = Serial.list()[0];
println(Serial.list());
myPort = new Serial(this, portName, 115200);
myPort.bufferUntil(lf);
background(0);
}//setup