HyperCube Home Store Updates ArduOne Murano Burano Java Forum WhoAmI

This page is about using java to build graphic interfaces for Arduone. It is not a page to learn java but rather a collection of all the graphic interfaces built to provide ArduOne with an appropriate graphic data representation on a computer. Nontheless for those interested in learning java programming in this a link to a very good book written by Bruce Eckel entitled "Thinking in Java":

http://sd.blackball.lv/library/Thinking_in_Java_4th_edition.pdf

The author is happy to offer a free copy but i believe he would be happier if you buy a hardcopy as well.

Those who want to download the latest version of the compiler and virtual java machine can do it from the Oracle website:

https://www.oracle.com/technetwork/java/javase/downloads/index.html

Some might argue that being ArduOne programmable in C the natural choice for the graphic interface had to be C++, which is an extension of C. I did chose java for various reasons. First of all because I know Java and not C++, but also because Java, and it is also the opinion of experienced programmers better than me, it let you write code quickly using graphic classes already tested and available in the standard library. Furthermore java is modern and suitable for internet programming if you want to reach ArduOne via an internet connection.

Since java does not directly manage the serial or parallel port, who want to use java as an interface between the PC and the Arduone card, necessarily have to download a special package. The most popular alternatives are; JSerialComm and RXTXcomm. In all the interfaces listed below RXTXcomm is used. The library is well documented and in the INSTALL file you can find the installation procedure for Windows, Linux, Mac Os X and Solaris. Here are the instructions to succesfully add RXTXcomm library to your java programs on a windows system:

To check if everything is working you can run this program, it simply reads a string from your serial port. Once you are sure that you have a serial port on your system and you know its name just change the in the program the term "COM3" with serial port's name installed in your PC. Program will be loaded soon as text file. You can use any RS232 data source but since the aim is to communicate with ArduOne here is a simple program in SDCC C sending a "Hallo world" message whenever the reset button is pressed.

Java program's list

Description Java file SDCC C File Photo and/or Video
RXTXcomm testing TestRXTX.java HalloWorld.c ---
RadarOne RadarOne.java RadarSimulator.c RadarOne.mp4
PWM instantiator MortorInstantiator.java MotorController.c ---
Using Java rxtx to read the status of serial portīs CTS CTSReader.java --- ---
Using Java rxtx to set the status of serial portīs RTS RTSWriter.java --- RTSCTS.mp4