Rapid prototyping for music, art and design work

How to connect Flash to external sensors using Processing and an Arduino board

The Flash meets Processing Meets Arduino setup

In the example, we use an Arduino board to receive analog signals from 3 sensors, and send them to the computer’s serial port.

A simple Processing application listens to the serial port, and creates an XML socket where it sends the signals it receives.

The Flash application listens to the XML socket created in Processing, and when an event occurs, a function is launched to process the received data.

Below are example snippets for each part of the solution:

Arduino code example
Processing code example
Actionscript code example

The Flash game shown at the presentation

The game sources (fla+arduino+processing)

– Viljo Malmberg, Aleksi Hyvönen and Brian Mogensen

Facebook Twitter Email

Category: Media Lab Helsinki, Snippets


3 Responses

  1. Sam says:

    Very interesting.
    Two questions: This is for MAC or PC? Is AS2 or AS3? serviproxy?

  2. VIljo says:

    Since it’s all techniques used are cross-platform, it should work on both mac and pc, and of course you need to download Processing ( to run it. The actionscript part is AS2; If you need help with an as3 port, drop me a mail.

  3. VIljo says:

    -> that is

Social links powered by Ecreative Internet Marketing