I have a processing program reading data from the arduino, what i want is the ability to disconnect and reconnect the usb port and have the processing sketch begin reading again. is this possible?
i am using 2 way communication between arduino and processing, the arduino is constantly sending data to processing, and serialevent is called when the line feed character is found. it then stores the parts of the string received in arrays.
when i try to send data to the arduino, i get the error
error, disabling serialEvent() for //./COM4
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at processing.serial.Serial.serialEvent(Unknown Source)
at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732)
at gnu.io.RXTXPort.eventLoop(Native Method)
at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575)