I came across a terrific tutorial explaining how to interface Adode Flash with an Ardunio microcontroller. I realize, again, that this is probably old hat to everyone but it’s all new and exciting to me. I followed somebody else’s hack on connecting an Arduino and using it’s hardware to manipulate Flash but it was very confusing and I kludged my way through it. The Interfacing Flash and Arduino, from scratch tutorial on jpcote’s blog was very intuitive and well written. Interfacing Flash with Arduino hardware is important for several reasons, first and foremost is I am an experienced Actionscript programmer and know Flash intimately. I want to be able to access the Arduino hardware and monitor sensors, stream video, capture data etc…. all through a really whizbang Flash interface.One of my ideas for a hack is to have a train, loaded with three cameras (left, right, and center) stream video into a Flash interface that is drawn to look like the cab of a diesel or steam engine. Maybe be able to capture RPMs and have that converted to scale miles per hour and come up in the Flash interface. Well, for the first steps I’m going to run through this tutorial and get Flash and Arduino playing nice and then switch from the example LED Blink sketch to one that allows me to actuate a servo back and forth through the Flash interface. That would be super cool!
Then I will mount a small wireless camera to the servo to pan the camera back and forth. I’ll go with a standard wireless camera and stream the video directly to a TV for now until I can get an Arduino Bluetooth setup going to stream footage directly to the PC. Then it’s a matter of figuring out how to get that video into a Flash interface but I’ll worry about that down the road. I think I’ll use the Aruino servo controller with the potentiometer that I mentioned in my previous post as a building block for this hack – I did say that the servo controller was going to be a basic model railroading hack building block – I’ll just modify the sketch to accept input via the USB as well as the potentiometer. That way you can use the pot as a means of manual adjustment in the hardware directly before using Flash to move the servo.
Well, thats my plan anyway. I’ll start an official Arduino & Flash: Moving a Camera Hack post shortly. I also have some pictures and a small video demonstrating my Arduino Servo Controller to update my previous post to replace the pictures of someone else’s.
I had a chance to run through this tutorial – you can see my results in my Using Arduino with Adobe Flash for Model Railroading: Part 2 post








Hello hacktracker
I am also looking at doing turntable control (just started my research on the Arduino last Friday!).. Instead of servos I plan to use a DC motor for smooth operation, over the stepping of a servo motor. Feedback will be through optical disk for positioning, with a index optical track. By keeping track of the turntable position, I can also slow down as the table reaches the destination. Software will determine the shortest path CW or CCW. On power up, the turntable will go to the index position, to determine its starting position.
It will require also require logic (human input) to decide which way the locomotive is orientated on the turntable, and which end will line up with the exit track.
As a variable, plan to use a setup routine to set the low speed and fast speed operation of the motor driving turntable.
Good luck with your project.
Regards BIll
[Reply]
Craig Bickford Reply:
December 3rd, 2010 at 10:40 am
@bill_kerr@shaw.ca, Welcome to Track Hacker Bill! I’m glad to see someone post about a related project! I chose servos because it’s what I have kicking around and it’s just a proof of concept project and servos are less complicated then a DC motor and encoder and I like simple. You’re project sounds AWESOME and I wish you the best of luck and would love it if you came back and commented on you’re results here! Do you have a blog or a website? If so, I will link to your project. Thank you for taking the time to comment!
[Reply]
I am very happy to find it, nice work, Thanks dear for sharing useful information. Its an amazing website. Jang Jobs Ads It is very useful to me.
[Reply]