AS3 and Arduino

It took some doing, but we got the Arduino to talk to Flash CS3 in a neat way. I’ve compiled that information here because I think it is useful and not explained well anywhere else.

First, you need to get Standard_Firmata.pde onto your Arduino. This is done just like any other Arduino sketch. Firmata provides the framework necessary to have read/write access the ports of the Arduino over the Serial connection. You can use any number of different programming languages to talk to the Arduino board without having to upload a different program to the board’s memory. Firmata rocks!

Second, (at least for Flash) you need to have a Serial Proxy running in the background. SerProxy functions as go-between for Arduino and Flash. Arduino speaks Serial messages, Flash speaks Socket Connection messages, and SerProxy acts as the bi-directional translator. SerProxy rocks!

Third, you need a Socket Connection in Flash. AS3Glue is a library of AS3 classes designed with this in mind, and includes built-in methods, properties and events for communicating with Arduino over the Socket-to-Serial path. The people over at protolab have adopted AS3Glue for their work, and have made a bunch of neat .fla files using the library.

At the end of this post, I’ve provided a screen shot of the base setup working, as well as a zip archive of the software you need to get started. It includes a quick readme to get you up to speed! Enjoy!

Flarduino ScreenShotFlarduino Archive

2 Comments »

  1. Jon said,

    April 8, 2009 @ 9:42 am

    Tahnk you very much for this post!!! :)
    it´s great!!! very very useful information!

  2. ArduinoとFlashの通信 : circumstance evidence said,

    May 24, 2011 @ 9:52 am

    [...] ArduinoとFlashの通信をトライしてみました。 もう3年前の記事だけどJoeさん(誰?)のブログ記事がわかりやすかったので意訳しつつ引用します。 [...]

RSS feed for comments on this post · TrackBack URI

Leave a Comment