Step 12Time to program the show
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:
| « Previous Step | Download PDFView All Steps | Next Step » |
1
comment
|
Add Comment
|
![]() |
Add Comment
|



















































