Arduino Flash communication AS2

In this video tutorial I explain how to setup communication between the Arduino microcontroller board and Flash ( Actionscript 2). Example files are included.

Update: See Arduino Flash communication AS3 – As3Glue bundle for an Actionscript 3 tutorial.

Tutorial that explains how to setup communication between Arduino and Flash with provided example files.

You can read sensors connected to the Arduino in Flash and send output information to actuators connected to the Arduino. Communication between Flash and Arduino is setup with the Serialproxy program that converts serial strings in to XML socket data.

The zip package can be download from :
arduino.cc/playground/uploads/Interfacing/flash_arduino_io_2.zip

UPDATE :
Serialproxy doesn’t work anymore under Snow Leopard ( osx 10.6 ) without installing Rosetta.
However you can also use Tinkerproxy2. That works in the same way as Serialproxy.
Just rename your serproxy.cfg to tinkerproxy2.cfg or you can rename the program tinkerproxy2 to serproxy.

tinkerproxy-2_0.zip

See the Playground in Arduino for more Flash implementations :
arduino.cc/playground/Interfacing/Flash/

  • Pedro Gonçalves

    hello..
    been using your arduino to flash communication and everything was working fine until now..
    a couple of seconds after running the .swf file, the serproxy gives this message:

    Server thread launched
    server(1) – thread started
    server(1) – EOF from sio
    server(1) exiting

    and it keeps exeting…

    is there a solution?
    if there is, email me at p_e_u@hotmail.com

    cheers!
    great script by the way.

  • Pedro Gonçalves

    Hi again!

    Have another question for you.. Everything is working great with my Arduino Diecimila board in the Arduino 12 enviorment!

    But I wanted the interface in to a different number of computers so I bought another arduino, this time a Duemilanove..
    I have no problem uploading any other sketch. The flash_arduino sketch is the only one that seems to impossible.

    When the Upload button is pushed in Arduino 15 the following error messages appears:

    ————————- errors ————————-

    /Users/pedrogoncalves/Desktop/Arduino2Flash/flash_arduino 2/arduino_flash/applet/core.a(wiring_serial.c.o): In function __vector_18':

    /Users/pedrogoncalves/Desktop/arduino-0015/hardware/cores/arduino/wiring_serial.c:112: multiple definition of __vector_18′

    /Users/pedrogoncalves/Desktop/Arduino2Flash/flash_arduino 2/arduino_flash/applet/core.a(HardwareSerial.cpp.o):/Users/pedrogoncalves/Desktop/arduino-0015/hardware/cores/arduino/HardwareSerial.cpp:95: first defined here

    Couldn’t determine program size: hardware/tools/avr/bin/avr-size: ‘/Users/pedrogoncalves/Desktop/Arduino2Flash/flash_arduino 2/arduino_flash/applet/arduino_flash.hex’: No such file

    avrdude: can’t open input file /Users/pedrogoncalves/Desktop/Arduino2Flash/flash_arduino 2/arduino_flash/applet/arduino_flash.hex: No such file or directory
    avrdude: write to file ‘/Users/pedrogoncalves/Desktop/Arduino2Flash/flash_arduino 2/arduino_flash/applet/arduino_flash.hex’ failed

    ————————————————————

    Any way of resolving this…? maybe its incompatible with the arduino 15?

    Or with the Duemilanove Board??

    thanks again for your quick response
    and if you have some kind of answer please email me at p_e_u@hotmail.com

    Cheers!

  • See the comments in the vimeo clip regarding arduino 15.

  • Nabetse

    I’m having the same problem that Liz Arum comment on vimeo. With the duemilanove 328 Arduino is receiving data but Flash is not. Or at least, not more than once: at the beggining of the Flash execution it gets all the values but then they stay the same from that point on.

  • Sarthi Gupta

    Hi ! I am facing problem after loading std. firmata on my Arduino Mega , i cant see standard firmata printed on my serial monitor instead something random gets printed.

  • Please make sure you put the baudrate good in your serial monitor. I think 57600 out of my head for standard firmata.

  • Sarthi Gupta

    When i click on serpoxy ,a window open and closes in fractions …so hoe to run serpoxy ??

  • You have to configure it before (.cfg). Please read the instructions and check to video. That should explain everything. I don’t know if Windows8 is supported.

  • Dan Berger

    I am having an issue uploading the code to my Arduino Uno…as there is a keyword that is no longer supported “BYTE”…Is there a code fix to resolve this issue?

    “Arduino: 1.5.3 (Windows 7), Board: “Arduino Uno”
    arduino_flash.pde: In function ‘void sendInputsToFlash(boolean)’:
    arduino_flash:142: error: ‘BYTE’ was not declared in this scope

    As of Arduino 1.0, the ‘BYTE’ keyword is no longer supported.
    Please use Serial.write() instead.
    This report would have more information with
    “Show verbose output during compilation”
    enabled in File > Preferences.”

  • I think the easiest thing is to download an older version of Arduino to upload the sketch. Since Actionscript 2.0 is hardly used nowadays, I won’t update the script anymore. I think with Arduino 0017 it will work.

  • Dan Berger

    Will certainly give it a try. I’m setting up a Compaq PC with Windows XP, to try to make it work. What version of Flash was used in that AS2 build?

    Thank you :)

  • I think Flash 8.

  • Pablo Vrecic

    Dear Kasper: Amazing tutorial. Have one question, im trying to use a relay with flash+arduino.

    I make all the conections, and when i use the arduino monitor everything is alright. But when i use the standalone monitor and activate the digitalouts pins the relay start to activate and desactivate constantly like if you press and release the botton very fast…can u helpme?

    The conection is arduino pin to a Tip31C which handles the 12v for the relay.

    Thanks, and again…great tutorial

  • Maybe it is something related to noise. I have no clue. I also would advice you to use Firmata and the AS3 solution.