is it me? or Processing 4? or macOS 12?
i’m trying to read serial data not in draw()
but in serialEvent()
– which worked fine in the past.
but serialEvent()
is only called about 100-300 times in the very first seconds and then stops.
serial communication in general works fine in different other Serial monitors and also if read in draw()
.
example code:
import processing.serial.*;
Serial serial;
int count = 0;
void setup() {
printArray(Serial.list());
serial = new Serial(this, Serial.list()[9], 9600);
}
void loop() {
background(0);
}
void serialEvent(Serial p) {
count++;
println(count+": "+p.readStringUntil('\n'));
}