Serial.read() gives null value from Arduino and or the port is not open on processing side

Please provide your ino code. Or a short portion of your output data from the serial monitor.

Make sure the serial monitor is not running when you run your Processing code.

Also, look at @GoToLoop’s code here: https://forum.processing.org/two/discussion/16618/processing-with-arduino-void-serialevent#Item_5 and see if you can modify it for your case. Use it for testing your unit independent of your code changes and other implementations there in your first code.

Lastly, make sure you are processing at the same speed aka. bps in the serial monitor instantiation.

Kf

1 Like