Java-Arduino-Communication-Library icon indicating copy to clipboard operation
Java-Arduino-Communication-Library copied to clipboard

Is there a way to detect if the Arduino has been disconnected?

Open yousefamar opened this issue 6 years ago • 1 comments

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.

yousefamar avatar Mar 03 '20 20:03 yousefamar

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!

HirdayGupta avatar Mar 05 '20 06:03 HirdayGupta