What I will build if I am selected(the more detail, the better!):

 

Synpopsis
At carnivals they usually have a dunk tank where a person, which I usually see dressed as a clown, heckles the crowd to lure them into paying money and attempt to dunk heckler.  The Heckler makes faces and yells things at people as they walk by.  I want to build a pumpkin that does the same thing but heckles trick or treaters or attempts to startle them by waking up suddenly with a loud "BOO!"

 

 

High level description

A group of trick or treaters walk up to the door and notice a foam pumpkin sitting there, no lights inside.  Suddenly eyes and a mouth appear and it begins speaking.  It yells out BOO! then begins heckling the kids using various pre-recorded skits.

 

The eyes are moving, the mouth is moving, all animated.  One of the kids touches the eye, and the pumpkin reacts with pain and says some choice words.  Another pokes the pumpkin in the mouth and it acts disgusted and pretends to spit out the taste.

 

After the kids leave the pumpkin  begins yelling out random things such as "Hey, You there!".  It sings some Halloween songs and later goes to sleep, waiting for its next victims. It may choose a funny face or an evil face next.

 

The Hardware

Inside the pumpkin will be a Raspberry Pi, a PIR motion sensor, an amplified speaker, and the Raspberry Pi Screen.

A large foam or plastic pumpkin will be used.

 

IMG_20150914_195004305.jpg

 

Only 1 screen is needed so a pumpkin the correct size will need to be found to fit the screen and have the face be the right size.  In the below picture the holes are cut and the screen is seen through the holes.  When the pumpkin turns on, animations will be displayed to have moving eyes and a moving mouth.  They eyes and mouth can be touched and will provoke a reaction.

 

The eyes and mouth will be sprite animations of various forms.  In order to move the project along, I will be using free clip art and sound bytes, though I will have to record some of my own sounds.

 

The PIR sensor will be hidden a disguised as a mole of I choose to get the pumpkin a hat, it can be hidden in there.  When the pumpkin is in sleep mode, it will be awaken by either a timer or an event from the PIR sensor.

 

animated.jpg

 

Here is a concept picture of what one face could look like:

 

animated.jpg

 

 


The Software
As much as I love C and SDL, I am going to use Python and the PyGame library.  If that will not perform well enough, I may switch to Java. 
The PyGame library is easy to use and has little overhead to get up and running.  In only a few lines of code, I can have a sprite moving around the screen.  I found that Python is more popular amongst many Pi users and I want this to be a recreatable project that can be more easily modified by Makers.

 

I plan to use as much pre-written software, clip art, and pre-recorded sounds bytes as I can.  I found trying to recreate everything from scratch causes me to lose focus on getting the project completed.

 

 

There exists animated GIF already that mimic mouth movements and the cells from the GIF can be animated with the Pygame library.

 

The bulk of the work will be to find images I want to use, and record skits I want to play back.

 

Animations will be on one thread, sounds on another.  An additional thread will monitor for "mouse clicks" or screen pokes.  All threads will have a synchronizing method.  The RPI 2 is great for multithreading as it as multiple cores and I feel has enough power to handle this application with a high level scripting language.

 

 

Summary

Plastic or foam pumpkin

An Animiated face

Pre-recorded sounds

A interact able face via the touch screen

PIR sensor for motion detection

Raspberry Pi

Raspberry Pi Screen

Powered speaker

 

 

 

About Me

Many years ago I decided to learn DirectX programming under windows.  While this is a specific framework, the generic principles of game programming apply here.  Such concepts as double buffering, bitmapping, the blitter, and the video memory are similar on any platform for general use.

My kids and I build Halloween decorations from felt like the kits that are sold to build little houses.  This will go inline with that activity and will give us a good prop to add to our current set of props we have built!

 

I recently completed a project in the Sci Fi Your Pi Challenge called the QuadCOP in which I had to get into the intricates of the Pi and its multi-core capabilities.  Threading on the cores will be an important aspect of this project in order to play sounds and animations at the same time, which keeping them in sync.  I did a similar concept with the QuadCOP where the GPS NMEA parsing is done on its own thread and it sets flags in order to let the main process know what is going on.  Python allows threading and I will be taking advantage of this.

 

I have learned from my previous project to not get bogged down in so many technical details but use more high level languages in order to move the macroscopic portion of the project along.