Friday, November 03, 2006

Serial Communication with Flash

Finally got Flash to talk to Arduino. Turns out you have to install Dan Sullivan's serial server (http://itp.nyu.edu/~dbo3/SerialServer/SerialServer.html) and make sure to send data in dec form terminated by 0. This setting seems to work pretty great::

java -jar /Applications/ss6.jar SerialPort:/dev/tty.usbserial Baud:9600 SocketPort:9001 Sub0ForChar:13

Of course the Port will change depending. As far as flash goes, XML socket takes data in , so if there is more then one value passed (for instance, the switch and an analogue sensor), you have to adjust for the lack of structure.

What i did is set up a "control value" in Audrino code (say control value is 999) and set up an array in flash that stores data each time it's passed until it encounters control value. That way i can pull array[1] as first sensor, array[2] as second and so on.

0 Comments:

Post a Comment

<< Home