Rebuilding...
Conversation Starters for Disparate Lovers
Because Flash lacks support for accessing serial ports (for good reason), getting it and an Arduino talking isn’t as easy as it could be. I’ll show some examples and help you through this process. Once Flash and Arduino meet, you’ll see why they can’t stop talking.
1. The Arduino Platform
Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It’s intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.
2. The Flash Platform
The Flash Platform is an integrated set of application programming technologies surrounded by an established ecosystem of support programs, business partners, and enthusiastic user communities.
3. The Problem
The Flash Security Sandbox prevents access to much of a user’s local hardware. This prevents malicious software from being written in ActionScript and deployed across the internet using the ubiquitous Flash Player. However, this also prevents Flash from speaking with serial devices connected to the user’s computer, such as an Arduino. The solution involves getting several different pieces of software, possibly running in multiple environments and in completely separate locations, all in sync.
4. The Solution
What you will need to get Flash & Arduino talking:
- Code on the Arduino to send and / or receive data via the serial port.
- Code in Flash to send and / or receive data via a network socket.
- Code on your web server or local computer that accepts network socket connections and relays data over a network to connected clients.
- Software that transfers incoming data between serial ports and network sockets, a proxy.
5. Examples
• Lumens
6. The Details
A. General
• Serial Communication
• ASCII
• Baud Rates
• Network Socket
• TCP & UDP Ports
B. Arduino
• Serial
C. Flash
• XMLSocket Class
• Moock: Cross Domain Policy Files
D. Socket Server
• Zend Developer Zone: Writing Socket Servers in PHP
• Kirupa: PHP 5 Sockets with Flash 8
• Giant Flying Saucer: Building a Flash socket server with Java in five minutes
E. Proxy
• Serproxy
• TinkerProxy
• Arduino2Flash
• Funnel
• Giuseppe
7. Downloads
8. Resources
• Arduino playground – Flash
• Arduino playground – SerialNet
• Aral Balkan: Turn up the heat in Flash with Arduino
