Arduino VS Flash
Doesn't Arduino VS Flash sound great! Imagine.... you can make custom flash interfaces that control robotics and stuff, even, have a touch screen control panel on a wireless PDA in Flash and have it move sculptural forms from remote. [i did this once, see Cyber_Dolls].
The problem is Flash at the moment can't speak to serial and usb ports
but it can speak through sockets, so we need an intermediate program -
the serial server, to go between the two. You can make your own in PD or Max/MSP that communicates to Arduino through serial / usb and uses an XML socket to talk to flash. Or you can use a deicated serial port server that sits in the background and translates between the Arduino usb / serial port and an xml socket in flash. There are a couple available but i prefer to use the one below, its the same one i use for PICmicro vs Flash as well.
Here is a working example using very basic serial port functionality >
<Arduino board setup>

<Arduino code .pde - copy text to Arduino software>
int firstSensor = 0; // first analog sensor void setup() {
Serial.begin(9600); } void loop() { firstSensor = analogRead(0)/4; delay(10); Serial.print(firstSensor, DEC); Serial.print(0, BYTE); delay (50); }
<Screen shot of Flash>

<Flash .fla can be downloaded HERE>
you may have to jiggle the number to get better response depending on what sensors and resistors you are using.
<screen grab of serial server - which can be downloaded HERE>

<video of it in action - loading . . . >
<watch the bunny's mouth as the hands shadow covers the LDR>
Basic Procedure is this : > Program your board with the code above > Run the java serial server > publish the flash movie
Obviously this is just the beginning for you to develop more complicated code.
++++++++++++++++++++++++++
There is also another solution which again uses a serial port
server and also an action script .as class and a .pde for you Arudino board.
His objects can be downloaded from the authors website >
http://www.progetto25zero1.com/b/tools/Arduino/
The above way assumes a certain about of understanding of both Arduino coding and ActionScript [I'm not so good at this]
|