Home » Adobe, Arduino, _Favourites

Arduino and Flash: control your Flash applications from external hardware

19 October 2009 6 Comments

I’m so excited for my first real experiment with Arduino and Actionscript 3.0 using external hardware to communicate and control my Flash applications, and viceversa.

arduinoandflash

What you’ll see in the video:

1) I have moved a movieclip using an external potentiometer
2) I have turned on/off two LEDs clicking on a Flash Button Component
3) An yellow movieclip is automatically updated to display the light intensity in Flash getting values from a photocell LDR sensor.
4) I clicked on a button on my breadboard, sent the instruction to Flash that will turn ON some LEDS for only 1 second.

So everything is managed using ActionScript 3.0.

NOTE: in my board I have connected a Thermistor and a Tilt sensor too but they are not used in the video.

How could be useful all this?
In the market there are a lot of sensors (audio, proximity, accelerometers…), motors, radio components(wifi, bluetooth, irda.. ) and other cool stuff that you can manage knowing a bit of electronic and programming a microcontroller (often in C).
You can also use existent modern game pads, like your WII /XBox/Ps3/PSD controller, open them , “connect their circuits” to your Arduino and program them to control your Flash games.

Now think how many stuff you could manage from your Flash/Flex/Air software:
domotica, interactive interfaces, security systems, robot, cool touchscreen totems with every kind of sensor and every type of electronic stuff you have always dreamt.

Probably, if you are reading my blog you are a Flash/Flex Developer and you don’t have a lot of electronic knowledge.
It could seems simple but it’s not. The main problem I had was move myself in a new world: electronic and microcontroller. So I spent a lot of time reading blogs, articles, books about Arduino and i’m still reading others 3 books (thanks amazon) to improve my vocabulary and understand new electronic and hardware concepts.

6 Comments »

  • Fabio Biondi Blog » Blog Archive » Arduino and Flex: connect a joystick to your application said:

    [...] content: - Arduino and Flash: control your Flash applications from external hardware - Arduino: control a LED and one servo motor using a [...]

  • iPhone Application Development: No More a Geek’s Darling! | Geek or Unique said:

    [...] Arduino and Flash: control your Flash applications from external … [...]

  • Marcos said:

    Fabio, I have looking for something like this for a long time.

    Do you conect directly though serial port (USB from arduino) or are you using another method?

    Could you send me the code of arduino and flash?
    I appreciate if you can send me.

    Thank you.
    Marcos

  • Fabio Biondi (author) said:

    Hi marcos,

    Yes, i have used Arduino Duemilanove with the USB port.

    There are more ways to create the Flash/Arduino communication.
    I have written something about Flex, Flash, XML socket and using Glue Libraries.

    Check following links:

    Arduino and Flash: modify your existent Flash games to work with a joystick
    http://www.fabiobiondi.com/blog/2009/11/arduino-and-flash-modify-your-existent-flash-games-to-work-with-a-joystick/

    Arduino and Flex: connect a joystick to your application
    http://www.fabiobiondi.com/blog/2009/10/arduino-and-flex-connect-a-joystick-to-your-application/

    In my opinion, the As3 XML socket Class is the most flexible solution (even if ASGlue are good too) but the samples I wrote on my blog are not really good.
    I’m improving them to fix and manage some situations. Maybe I’ll post it in the next weeks.

    Hope it’s usefull…..

    PS: I suggest you to buy Make Think Talks, an Oreilly Book to get more info about Arduino Communitcation (with wifi, bluetooth, php… and flash too )

  • Marcos said:

    Thank you Fabio.
    It worked with asglue.

    Keeep sharing you projects. This is very helpyfull.

    I am always following your blog.
    Thank you very very very very much!!!

  • rosy said:

    I am always connect with friends through blogger.
    nice post Thanks for Sharing

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.