Pages: [1]   Go Down
Author Topic: ImageJ + Arduino?  (Read 1596 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been using an Uno for a while now and am getting proficient with it, and I'd like to interface it to the open-source image processing app ImageJ (http ://rsbweb.nih.gov/ij/) in Mac OS X (10.6.5).

ImageJ can communicate via a serial port, and my interest is in sampling an analog voltage when I snap a camera frame and adding alphanumeric data to the image, but I haven't seen anything about communicating through a virtual serial port (USB) to the port on the Uno.

It seems to me bidirectional communication should be possible since that's what can be done through the Arduino programming environment, but I've not been able to find a solution that doesn't employ creating a for-real RS232 interface for the Uno and tying it to a for-real serial port (which intel Macs don't have and I'd rather not have to need a USB-RS232 converter - a side benefit to communicating via USB is grabbing the power to run the Uno board!).

I'm trying to keep this all as open-source, off-the-shelf, multi-platform (eventually running on PC), and on-the-cheap as possible, so the fewer components the better (i.e. no converters), and it can't get simpler than communicating and powering via the USB line.

Has anyone here managed a virtual port between the app & the hardware that STILL lets the hardware development app communicate (one app running at a time, of course)?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 614
Posts: 49343
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
ImageJ can communicate via a serial port, and my interest is in sampling an analog voltage when I snap a camera frame and adding alphanumeric data to the image, but I haven't seen anything about communicating through a virtual serial port (USB) to the port on the Uno.
The relationship between the virtual serial port that the PC applications talk to and the Arduino's serial port is handled by the driver on the PC and the chip (FTDI or other) on the Arduino.

Have ImageJ talk to the serial port that the Arduino is connected to. Have the Arduino talk to the serial port. Instant communication.

Quote
but I've not been able to find a solution that doesn't employ creating a for-real RS232 interface for the Uno and tying it to a for-real serial port
How are you programming your Uno? That process doesn't involve a for-real RS232 interface and a for-real serial port.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the reply!  Again, I'm doing this stuff in 10.6.5, so PC conventions don't necessarily apply...

ImageJ is using RXTX (rxtx.qbang.org) to manage its serial connections (be they real ports or virtual. same for the PC side).  The Arduino programming environment develops its own relationship with the particular OS's serial drivers.

At present it seems that RXTX's resources so glom-up everything that the Arduino software can't communicate with the Uno.  Uninstalling RXTX solves that but leaves ImageJ with no comm tools.

Ultimately I'd like to have ImageJ AND Arduino online simultaneously so I can troubleshoot/reprogram from both ends, as well as allow them communications with each other.

I know this kind of makes a 'Y-connection' between the three devices which is inimical to serial communications, but IJ is popular and Arduino is popular and I figured I can't be the first one to have tried this - so I'd 'thrown out a line' to see if anyone has been-there-done-that yet.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 614
Posts: 49343
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can only have two devices on a serial connection at one time. If there is a need to reprogram the Arduino, you need to stop it talking to/listening to ImageJ anyway. I'm missing the need for ImageJ and the Arduino IDE to be able to talk to the Arduino at the same time.

There is a version of RXTX supplied with the Arduino IDE. If they are not compatible, perhaps the Arduino IDE can use the other one...
Logged

Pages: [1]   Go Up
Jump to: