Java-Arduino-Communication-Library
Java-Arduino-Communication-Library copied to clipboard
Is there a way to detect if the Arduino has been disconnected?
Is there a undocumented flag or such to check if the serial port is closed? As far as I can tell, serialRead will just start returning empty strings when the Arduino is disconnected.
There isn't such a flag unfortunately. I don't think there's a neat way to detect if a serial connection has been disconnected. If you come across something do let me know and I can add it in to the library!