I have been working with Arduino lately. I must say it has made me really excited about technology again. There is something about creating physical devices that is more rewarding then always working on virtual projects. Having said that, ever since I started working with Arduino I have wanted to make interfaces for it with Flash. The tutorials I have found for connecting the two all exploited the XMLSocket object in AS2. Using the XMLSocket has some small issues to it, namely it needs a null byte on the end of each message. ActionScript 3 fixes this little speed bump by including a binary socket that does not need a null byte to end a message. I had to try it out for myself so I put together a small demo of serial communication between Flash and Arduino using the TinkerProxy.

Get it here

13 Responses to “Flashduino!”

  1. Josh Says:

    Very cool. I’ve passed this along to the coworkers and am going to have us take a look at this platform. Had not heard about it before. I hear you re: the physical realm. I’d kill to build some cool things, combined with some wood work and nice milling.

  2. Arduino controlled Flash fire at Aral Balkan Says:

    […] make sure that the socket is working correctly, you can quickly download and run the Flashduino Flash demo by Brett Forsyth (just make sure you change the port in the code as that one’s made for […]

  3. Getting Flash and Arduino talking, and problems with AS3 at Iestyn Lloyd Says:

    […] espically when people have done it already, and you can copy and paste their code! Thanks Beltran, Brett, and Aral for sharing your code! In no time I had a potentiometer controlling the brightness of an […]

  4. Lukas Vojir Says:

    Hey, thanks for your code, I used it in my Trimphone project, have a look!

  5. Brettf Says:

    Hey no problem you should also check out as3glue http://code.google.com/p/as3glue/ It works really well.

  6. Flash(AIR)?????????????? » TECH Matari Says:

    […] Flashduino! […]

  7. ekkarach Says:

    Thank you so much,
    I’m trying about this.

  8. Final Project « arch 430 | networked technologies Says:

    […] Arduino Microcontroller for physical interaction with flash media [this prototype is in my opinion the easiest to get started with, there are many others to look at as […]

  9. David Says:

    Hi there, I’ve been using an AS2 socket to access the values from some accelerometers and and a gyro but would really rather use AS3.

    Your sample code works great, but I’m experiencing the same problems that Iestyn describes on his blog i.e, the data from the arduino is split into two lines. Do you have any suggestions on how to avoid this? I don’t want to have to restart with AS3glue unless I have to.

    Many thanks for sharing,


  10. David Says:

    Ok, so I’ve sort of found a solution to my problem…by using a different computer (xp instead of vista) and changing the baud rate in the device manager settings too…this seems to make the data stay on just one line.

    Unfortunately when running in the Flash environment the code eventually slows down and then hangs (I have to close serproxy in order to unfreeze things) any ideas what might be causing this? Is there any kind of flow control that I might need to implement?

    Thanks again,


  11. Eddie Says:

    Hi, I am trying to control PTZ of a SONY VISCA EVI D100 camera through Adobe Flash.

    I have found the information from Adob Evangelist – Kevin Hoyt – that serproxy could act as the handshaker between serial RS232 to Adobe Flash.

    Does it mean that if I could successfully set up the serproxy on a PC, I could send command like “8x 01 04 07 00 FF” to tell the CAM_Zoom to “Stop”?

    Thank for your help in advance.


  12. Brettf Says:

    Hello Eddie,

    I think this should be possible. Did you get it working already?


  13. Flash ?? Arduino???–??? | VECTOR Media Art Studio Says:

    […] as3????arduino library??????????????Flash CS3 Binary Socket Example?Arduino Flash AS3 communication with Messenger library?NETLab Toolkit […]