Archive for Innovation and Invention

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

Comments (10)

Innovation & Invention

Alright. For those of you looking, here’s where I’ll be putting info relating to the Innovation and Invention class I’m taking this quarter. If you aren’t familiar with the class, it’s where we set out to do something we don’t know how to do. Currently, we’re working towards the goal of a set of tools and environmental elements that encourage collaboration, even across distances. If it sounds vague, it is – but that’s why you should check out this page: http://casci-web.rit.edu/%7Ecollaboratorium/

Comments