Arduino and Flash: control your Flash applications from external hardware
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.
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.










[...] content: - Arduino and Flash: control your Flash applications from external hardware - Arduino: control a LED and one servo motor using a [...]
[...] Arduino and Flash: control your Flash applications from external … [...]
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
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 )
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!!!
I am always connect with friends through blogger.
nice post Thanks for Sharing
Leave your response!
Archives
Categories
Blogs
3D ActionScript Adobe AIR AIR for Android android Arduino Binding burrito hero 4.5 TabbedMobileApplication Chat Chrome Cocomo code optimization components custom/generic components custom components DataList developer central Emitter FLARToolkit Flash Flash Builder Flex HTTPService illustrator Infrared Interactions itemRenderer Joystick Loader mobile Papervision PHP Rss Servo singleton Skin Skinning Transitions Tween URLLoader URLRequest Vertical Scrollbar VScrollbar youtube
WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.
Recent Posts
Develop Mobile apps with Catalyst?
Code optimization
TextInput Component
Interactions and Transitions
Most Commented
Recent Comments
how to call methods between swf files