Discussion:
ImageJ & serial port communication
Markus Antoschak
2006-09-10 20:25:19 UTC
Permalink
Dear users,

i've a problem to communicate with my serial port. I use the RXTX package
and it works fine with some Applets but it doesn't work in an ImageJ-Plugin.
I want to send a char 'q' to my ASURO-Robot (www.arexx.com). A red LED
should blink but it doesn't. Do i forget something?

Here is a snap of my code:


static CommPortIdentifier portID;
int b = 'q';
static SerialPort serialPort;
static OutputStream outputStream;

....
...
..
try {
portID = CommPortIdentifier.getPortIdentifier("COM1");
}catch (NoSuchPortException port){}
try {
serialPort = (SerialPort) portID.open("mein_programm",2000);
}catch (PortInUseException portuse){}
try {
outputStream = serialPort.getOutputStream();
}catch (IOException io){}
try {
serialPort.setSerialPortParams(2400, SerialPort.DATABITS_8,
SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
}catch (UnsupportedCommOperationException e){}
try {
outputStream.write(b);
}catch (IOException ou){}
serialPort.close();

Best regards :)

Markus
Vincenzo Della Mea
2006-09-11 07:32:24 UTC
Permalink
You could give a try at our IJSerial plugin: http://www.eslide.net/
ijstage.php

Regards,
Vincenzo
Post by Markus Antoschak
Dear users,
i've a problem to communicate with my serial port. I use the RXTX package
and it works fine with some Applets but it doesn't work in an
ImageJ-Plugin.
I want to send a char 'q' to my ASURO-Robot (www.arexx.com). A red LED
should blink but it doesn't. Do i forget something?
* Vincenzo Della Mea
* Medical Informatics, Telemedicine and Ehealth Lab
* University of Udine, Italy
* http://mitel.dimi.uniud.it/ - http://www.eslide.net
Markus Antoschak
2006-09-11 19:30:26 UTC
Permalink
Thanks, i will try it.

Regards,

Markus

-----Ursprüngliche Nachricht-----
Von: ImageJ Interest Group [mailto:***@LIST.NIH.GOV] Im Auftrag von
Vincenzo Della Mea
Gesendet: Montag, 11. September 2006 09:32
An: ***@LIST.NIH.GOV
Betreff: Re: ImageJ & serial port communication

You could give a try at our IJSerial plugin: http://www.eslide.net/
ijstage.php

Regards,
Vincenzo
Post by Markus Antoschak
Dear users,
i've a problem to communicate with my serial port. I use the RXTX package
and it works fine with some Applets but it doesn't work in an
ImageJ-Plugin.
I want to send a char 'q' to my ASURO-Robot (www.arexx.com). A red LED
should blink but it doesn't. Do i forget something?
* Vincenzo Della Mea
* Medical Informatics, Telemedicine and Ehealth Lab
* University of Udine, Italy
* http://mitel.dimi.uniud.it/ - http://www.eslide.net

Loading...