Arduino and rxtx (java)


I’m actually using an arduino to make some measurment. The measurments are than sent to the computer by serial communication. I also use a GUI(graphical user interface) to control how and when the measurment parameters will be sent. Until today, everything was working, but when i tried to launch the application, i had an exception thrown and i have no data read from the Arduino. The exception that i’ve got Underlying input stream returned zero bytes.

I’ve attached two text file for the code. The one named ApplicationGraphique is for the GUI and the other one is for the serialCommunication. Sorry for the code, it’s not commented, because initiallly it was written by someone else and I have to make some improvments on it.

Thank you in adavance,

serialCommunication.txt (6.58 KB)

applicationGraphique.txt (30.9 KB)

Are you saying that your Java program and your Arduino program were working together perfectly yesterday and are you telling us that today the exact same, completely unchanged programs are not working together?

If so, the problem is unlikely to have anything to do with the programs and may well be to do with the connection between the Arduino and the PC.

What PC operating system are you using?

If you need more help please post your programs.