I need to write Simple JAVA program to read and write from USB serialto use it with Arduino

S

sahm

Hi every one

I’m trying to write simple JAVA program that could send command to Arduino board or read output from Arduino.
I tried java-simple-serial-connector library but I keep getting error.
And in Arduino web site they use gnu.io. classpath witch I have no idea howto use it with java

Please help me

Best
Salim
 
L

Lew

sahm said:
I’m trying to write simple JAVA [sic] program that could send command to
Arduino board or read output from Arduino.
I tried java-simple-serial-connector library but I keep getting error.
And in Arduino web site they use gnu.io. classpath

It's not a classpath.
witch I have no idea how to use it with java [sic]

I can answer only part of this. To use any library with a Java program,
typically one has that library in the form of a JAR file (file with name
ending in ".jar", in ZIP file format and possessing certain contents; GIYF)
that one includes in the classpath (GIYF).

There are also language requirements to using libraries involving the 'import'
directive. (TIYF: The Tutorial is Your Friend.)

Download the library you need and include it in your classpath.

Follow up here with the specific commands you use, exactly how you use them,
and copied and pasted output if you need further help. Make sure you do the
suggested research first.
 
A

Arne Vajhoej

I’m trying to write simple JAVA program that could send command to Arduino board or read output from Arduino.
I tried java-simple-serial-connector library but I keep getting error.
And in Arduino web site they use gnu.io. classpath witch I have no idea how to use it with java

Serial port support has not been a priority in Java.

I believe the most common recommendation is to go for rxtx.

Arne
 
K

Knute Johnson

Hi every one

I’m trying to write simple JAVA program that could send command to Arduino board or read output from Arduino.
I tried java-simple-serial-connector library but I keep getting error.
And in Arduino web site they use gnu.io. classpath witch I have no idea how to use it with java

Please help me

Best
Salim

On Windows, if you only need to read and write, you can do that with the
COM? port. If you need access to the serial data lines you need to find
an old copy of the JavaComm API. I'm using it with Windows XP, I think
it would work with Vista or 7 but I've never tried it. It is no longer
supported by Oracle(Sun) but you can find it if you snoop around. Last
time I checked, there was still a version available from Sun for Linux I
think.

I tried RXTX once but it was too buggy to use and there was no interest
in fixing it.
 
S

stledger

Hi every one I’m trying to write simple JAVA program that could send command to Arduino board or read output from Arduino. I tried java-simple-serial-connector library but I keep getting error. And in Arduino web site they use gnu.io. classpath witch I have no idea how to use it with java Pleasehelp me Best Salim

We have had good success with SerialPort from SerialIO.com. It has worked well for a several different serial devices.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top