“How do you program the light show?”

Untitled-1

Programming the Light Shows really isn’t that complicated, just time consuming. It seems to be a mystery for a lot of people and I still don’t really understand why. Not a lot of people seem impressed by my crude technique (people always seem to expect some kind of audio processing). In this post, I’ll share some of the things involved in programming the light shows and you’ll finally see how simple it is (again, it’s just time consuming).

The Functions: The show’s programs are made up of delays and for-loops. To use the hardware, the program uses basic digital and analog write functions, as well as the servo library.

The Process: The process is simply replaying the song over and over again and adding more code to it on each run. I work on the song in verses that I mark off in the code using either a line of ////////////// or the first line of lyrics of the next verse, commented out of course. Doing it in verses gives me points where I can decide to take a break… but really, it helps me keep track of where certain pieces of code is so I can go back to it and tweak it. Sometimes I will put a really simple pattern just to figure out the timing and then go back to it later and add more effects to that section.

Cuing It Up: I use VLC to play the song when I’m programming. In the earlier shows, I used to try and cue the song manually by watching the blinking TX lights on the Arduino as the program uploaded and then started the song once it was complete. It was kind of a guessing game that I’d figure out well enough to get things done. Eventually I realized I could just have an LED counting down like this:

// Count down (4, 3, 2, 1)
for(a=4; a>=1; a–){
digitalWrite(22, HIGH);
delay(500);
digitalWrite(22, LOW);
delay(500);
}

Time: It takes about a week to program 1 minute of show. I try my best to create fresh patterns so it gets incrementally more difficult as each new show is released. It’s also gotten harder as I’ve added more components to the stage in the later versions of the light show. This is why the shows have gotten shorter over time.

CAN I HAVE THE CODE?!!?: Yes! For the first time in a long time, I’m releasing code for some of the shows, specifically the most recent three. You can get the files here: http://www.mwhprojects.com/lightshow/code

I hope this has answered your questions about programming the Light Show. If you have any more questions, send me a message or leave a comment. Now go out and blind yourself with LEDs like I have!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s