Re: imagej vs. Arduino
Posted by
Peter Haub on
Oct 29, 2013; 8:15pm
URL: http://imagej.273.s1.nabble.com/imagej-vs-Arduino-tp5005366p5005370.html
Hi Marcel,
check this
http://playground.arduino.cc/Interfacing/Javato see how a SerialPortEventListener can be implemented.
You can register this type of listener and react on incoming messages
instead of waiting.
Regards,
Peter
On 29.10.2013 17:58, Marcel Krzan wrote:
> Hello everybody,
>
> Is it possible to construct better program in Macro for the data exchange
> between Arduino and ImageJ?
>
> Ext.write("a"); // send an order to Arduino
>
> wait (7000); // delay 7 s till the Arduino finish the
> necessary performance and send confirmation !!!
>
>
>
> data=Ext.read();
>
> if {data == "Z") { // ImageJ Macro do something
>
> else
>
> { // ImageJ Macro do something another ....
>
> My question is directed especially for the line 2 and 3 - how to construct
> Macro delay - the program should wait exactly till the data=="Z"
>
> Regards
>
> Marcel Krzan
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html