At a glance Main Projects Tutorials Resume

Poll

Do you think Flash would be a good way to control a robot?
It would be a great way
It wouldnt work
There are better ways


Flash Electronic Control


Two things that I am quite passionate about are web development and robotics. This project is part of an investigation into the concept of using the flash player in conjunction with Red5 as a way for controlling electrical devices. The reason for investigating an in-browser solution is that it allows platform independence and a very accessible control mechanism using readily available software and hardware. I am aware that there are many IP cams that essentially do the same thing that this project demonstrates. However, I would direct you to the "future direction" section below in order to see how this project differentiates itself.

Hardware

The hardware is connected using USB. There is a chip that translates USB+ and USB- signals to TTL levels which are sent to a small ATMEGA microcontroller. The firmware that I wrote for the microcontroller can be controlled with keyboard characters just like a video game. When the microcontroller detects certain characters it will use pulse width modulation to rotate the servo.

Future Direction

This project was created using some of the code from my GPS navigation project using the Red5 streaming media server. For this demonstration I simply wanted to show that it works. I will now be maturing the hardware in order to allow much more to be done then just panning a camera. My primary goal with the hardware will be to integrate some of the more complicated aspects of the robotics industry such as machine learning. For the flash component of this project I used AS2. Now that I am very familiar with actionscript, I plan on investigating Flex and Air in order to work on creating a much better UI as well.

Thank you for taking a look at what I have been working on. Please feel free to leave a comment, or vote in the poll.

Comments

Jon
Jon
2008-05-29 16:26:09

Hi! This is really cool! I was looking into trying to do some programming like this and need a place to start. Is there any chance you could give me some guidance on how to use the flash interface to interact with an electronic device? What code did you use in flash? If I wanted to use the interface to turn a light on and off, how could I go about doing this? Thanks so much! Any help you can offer would be greatly appreciated!!! Jon

Charles
Charles
2008-05-29 16:50:33

Hi Jon. Thanks for checking this project out! I certainly understand your enthusiasm. A really high level explanation of how I do this is as follows. The components used are 1. Red5 (which runs on Java) 2. Flash (You can use the free flex sdk) 3. RXTX (an open serial communication class for Java) 4. A microcontroller attached to the computer running Red5 via a serial/usb cable. I would be happy to talk with you more in depth about this to get your project working!

Charles
Charles
2008-05-29 16:57:50

To answer what is done in the flash client. What you do is establish a connection to Red5. You then use a Netconnection.Call to call a server-side java function. This server-side function uses RXTX in order to send a few characters over the serial/USB port to the micro-controller. The code on the micro-controller then knows to rotate the servo based on the characters it recieves.

Jon
Jon
2008-05-29 17:54:53

Hi again! and thanks so much for all of your information! Is there any chance you would be kind enough to forward me some of the code that you used in each of those steps? I'm not the most advanced programmer, but I am excellent at working with existing code and I need a template to start with. I think I'll be simplifing things a little as all I really need to do is send out a pulse through the USB to trigger an on/off circuit, so I think I won't really even need the microcontroller, just an open/close circuit. In anycase, I thank you again for all of your help and really appreciate your time! Jon

Jon
Jon
2008-05-29 17:57:41

Oh, my e-mail is jonkarafin@yahoo.com in case you need it. Thanks again! Jon

Name:

Message:

Avatar:
bomb avatar music player avatar email avatar nerdy tux avatar gimp avatar red hat avatar red time avatar mysterious man avatar tan smiley avatar devil smiley avatar pipe guy avatar

Complete the Re-Captcha to Post Your Message: