Arduino - usb disconnect error in serial.event in Processing
in
Integration and Hardware
•
2 years ago
Hey happy forum helpers
Quick question which might prove tricky - i cant figure it out yet myself.
I have an arduino with sensors sending data to Processing over the usb connection and processing is rendering visuals to the screen.
I have an issue - which is obvious really - that when the usb lead is disconnected i get the error in the console that it cant read the serial event and some errors todo with gnu.rxtx - the processing sketch keeps running but cant read the data. You have to restart the sketch even if you replug in the usb lead
Does anybody know how to code in a way that it could auto reconnect - or even with a keypressed command ?
I have a feeling its not standard code and that its more java i might need.
Im intermediate with my understanding of code but quite new to arduino interfacing.
Thanks a lot
Ashley
1