Processing
cp5.addTextfield("Current RPM")
.setFont(font1)
.setPosition(700, 600)
.setSize(250,100);
}
void serialEvent( Serial port) {
val = port.readStringUntil('\n');
if (val != null) {
val = trim(val);
y=int(val);
println(y);
x.setText(str(y));
}
I am trying to display current RPM on GUI. I recieve the data from arduino and can print it on the console but can't display on interface