Monday, January 10, 2011

Holiday Lights Project 2011


This holiday season me and my son embarked on the project of making 'light show' that took us for quite some time to complete.

The idea was that Max will play lights along with music. So we wrote a Java application that would play a given mp3 file in a thread, then another thread of the application would paint 'lights' over photo of our house to provide visual feedback while Max is playing inside, yet another thread would play video effects like rolling windows or lines, and yet another thread would communicate to the Arduino board by converting light states into a command and sending the command over serial port.
Keyboard listener is responsible for converting keystrokes into light statuses, which are used by separate threads to paint, and communicate, and play effects.






On the Arduino side I wrote little program that read command from serial port, parses it into integer, and then turn on and off output pins according to bits of the given integer.

So, from the inside when Maxim was playing the show it looked like this:



Max Christmas Light Show project -p1 from Konstantin Ignatyev on Vimeo.



From the outside it looked like this:

Max Christmas Light Show project -p2 from Konstantin Ignatyev on Vimeo.



Maxim performed the show at the New Year eve for all the friend who came to our home to celebrate New Year:


That was the best holiday decoration ever - I was so happy to work on this project with my son and watching him doing all that work in the physical world (soldering and assembling) and virtual world - programming in Java and Arduino. He did not do everything, but a lot, and it was fun teaching him about programming, and binary arithmetic, and communication protocols, and low level devices, and multi-threading!

Below are photos of the project in the making: soldering solid state relays and assembling power outlets.







2 comments:

Anonymous said...

Cool!

Anonymous said...

Cool!