3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

One Man Electrical Parade Halloween Costume

Step 12Time to program the show

Time to program the show
At this point, I've got the LED panel attached to the laptop via USB. The wireless keypad is also connected via USB and the audio is just connected to the headphone jack of the laptop. Now it's time to start writing some software to make it all do something interesting.

Java is my language of choice so I wrote a framework and a simulator for my light show. In order to play audio, I used the Java Media Framework and in order to access the serial port to talk to the Arduino, I used the RXTX library. I wanted to keep things simple, so I'm only writing data to the USB port and not trying to read any responses.

In order to sync the animations with the music, I just wrote a little code to start playing the song and then each time I pressed a key, it would mark a timestamp. Not the most precise method, but it worked well enough. I then used the timestamps to know when to switch to the next desired animation.

Once the code was written, I added some code to receive key events from the wireless keypad and the technical side of the costume was pretty much complete.

I ran a battery drain test and even using the laptop's USB port to power the Arduino and LEDs, it was able to run for just over 3 hours. I ended up moving all of the files to a RAM disk in hopes of being able to power down the hard drive and run the system longer. We'll see.

Here's a video of the rig in action:
http://www.youtube.com/watch?v=k8Z7iU0p19c
« Previous StepDownload PDFView All StepsNext Step »
1 comment
Sep 11, 2009. 8:02 PMSilentwolf2004 says:
OMG....Make It Stop !!!!! lol

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
4
Followers
1
Author:brokenpipe