As Halloween is approaching and the aftternoons grow rainy, it’s time for some tinkering. So, why not try to get the pumpkins a bit more interesting than cut-out veggies?

Getting some tinkerers together was no problem, so we got three families with kids, 4 pumpkins, one LEGO Mindstorms set and 2 Arduinos to start with. I recently discovered the awesome HiTechnic Prototype board, turning the LEGO Mindstorms set into a full IO-enabled prototyping experience with the added convenience of the thought-through LEGO sensors and the comfort of the LeJOS Java OS for the Brick. You get 6 analog inputs and 6 digital input or output pins – not bad.

So, I got one of these and started with wrapping the Proto Sensor into a LeJOS java class using the I2CSensor base. The communication protocol is fairly straightforward and not tight to the HiTechnic plugin software for the LEGO IDE they provide:

Now, you can communicate with the Prototype sensor with only minimal hassle. The first test was to just have a light resistor connected to one analog input, and light a LED upon shadowing it (see here) . Oskar and me settled on listening for the touch sensor to be pressed (sticking through the nose of the pumpkin). On press, we simply light the 2 LED-eyes (cool blue color) and play a short “Happy Halloween” file tw times that Oskar has been recording on an old iPaq, transforming it with Audacity into 8bit ECM WAV that the LEGO brick can play:

And voilá, the super-scary pumpkin is done and we even got time for some Kanelbullar and hot chocolate!
The competing comic-art-eyes super-cool-pumpkin is made by David Cuartilles of Arduino and 1Scale1 fame. It won the competition without problems – thanks all Pumpkin Pimpers for a great 3 hours with the kids!

Happy Halloween!

Leave a Reply

Close Menu