Arduino - Macro - command problem and list of commands ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Arduino - Macro - command problem and list of commands ?

nckrzan
Hi,

I just start to work with new project - I want to use the Arduino as an
interface between my computer and experimental setup.

For some point the project is OK.

The Arduino was connected and installed under Windows. The ImageJ also has
no problem with the connection by the Serial_ext .

However while the Arduino works perfect under the Arduino IDE (There i.e.
I can blink any LED I chose

 pinMode(2, OUTPUT);
digitalWrite(2, HIGH);
delay (1000);

then, in contrary using the ImageJ macro I can swith ON only the PIN 1

Ext.write("LED 1");
wait (10000);
Ext.write("LED 0");


The commend don't work for any other PIN

Can anybody explain it? I really need the connection with at least 4
various PINs

Other way - Has somebody the list of commands which can be used in the
Macro language with the procedure --> Ext.write("............");

Best regards,

Marcel Krzan
Reply | Threaded
Open this post in threaded view
|

Re: Arduino - Macro - command problem and list of commands ?

Wolfgang Schechinger
Hi Marcel,

does it mean you want to control the digital output of your arduino with ImageJ?
I think, there is a conceptual problem:

Controling Arduino digital outputs *directly* from a serial connection won't work AFAIK.

You'll need a routine in your arduino program that accepts input from the serial port (issued by ImageJ), interprets it and then controls the approoriate LED. Have a look at the examples in the Arduino IDE and transfer the PC part of the code to ImageJ, then it should work.

If you just need to turn on/off up to 8 ports, you also might consider writing the information encoded as a byte to the parallel port (means using a usb<->parallel adapter nowadays) or use a device like a labjack (www.labjack.com).  

PS: For those ignorant of the fantastic Arduino microcontroller, you might have a look at http://www.arduino.cc.

Have fun!

Wo

Arduino fan.


-------- Original-Nachricht --------
> Datum: Sun, 13 Nov 2011 22:19:05 +0100
> Von: Marcel Krzan <[hidden email]>
> An: [hidden email]
> Betreff: Arduino - Macro - command problem and  list of commands ?

> Hi,
>
> I just start to work with new project - I want to use the Arduino as an
> interface between my computer and experimental setup.
>
> For some point the project is OK.
>
> The Arduino was connected and installed under Windows. The ImageJ also has
> no problem with the connection by the Serial_ext .
>
> However while the Arduino works perfect under the Arduino IDE (There i.e.
> I can blink any LED I chose
>
>  pinMode(2, OUTPUT);
> digitalWrite(2, HIGH);
> delay (1000);
>
> then, in contrary using the ImageJ macro I can swith ON only the PIN 1
>
> Ext.write("LED 1");
> wait (10000);
> Ext.write("LED 0");
>
>
> The commend don't work for any other PIN
>
> Can anybody explain it? I really need the connection with at least 4
> various PINs
>
> Other way - Has somebody the list of commands which can be used in the
> Macro language with the procedure --> Ext.write("............");
>
> Best regards,
>
> Marcel Krzan

--
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone