Arduino serial monitor values to Java GUI TextArea

Hi there. I am struggling with a small project I have chosen to do which involves multiple sensors on the arduino such as an LDR and temperature sensor that I have got working on the Arduino Uno perfectly. I just want that data to be displayed using Java (Eclipse) onto a GUI TextArea. I look forward to hearing from you soon! My code at the moment is displayed below:

Thanks!

That sounds like you need to write a Java program to receive data from your Arduino?

I don't know Java but this Python - Arduino demo should point you in the general direction. Just write a Java program that can do what the Python code does.

...R

I don't see your Java program? Do you have one? If you don't know Java then you have a steep hill to climb. You will need to learn basic Java and probably Swing. Eclipse is just a development environment that can be used to generate your GUI and is used to generate 'jar' files. I use Eclipse but I use Swing directly and don't use the GUI builder because I find that the code it produces quite quickly becomes unmaintainable. Eclipse is not needed to run your Java program; all that is needed is an installed JRE.

To read the data from your PC serial port I recommend the jssc library.

I assumed the OP knows Java. But if he doesn't I suggest he gives it a miss. If he wants the benefits of the JRE (and there are many) then he could use JRuby.

I have written GUI code with Swing (and in Python with TKinter) but they are a real PITA. Now I create my GUIs s web programs using HTML and CSS for the visual stuff and view them using a browser. CSS in particular makes it very easy to modify the visual part.

...R

I made my living from Java for many years so of course I am very comfortable with it. Swing is a big beast but once one understands the basics it is not that difficult. It sounds to me like the OP has been given an assignment that explicitly mentions Java so he has no real choice.

I am not a Java zealot; I can't say that Python should or should not be used but I have worked with Python based GUI several times and I dislike Python's strict indentation rules. My experience is that unless dictated from above one should use the language and GUI toolkit one is most comfortable with.