November 24, 2024, 04:35:54 AM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


My Monster in the Box

Started by Zombie-F, September 23, 2010, 10:04:58 AM

Previous topic - Next topic

Zombie-F

Last year I worked on updating this prop to use pneumatics in place of the motor and cam design I had used in years past.

I used a prop-1 for the controller, a parallax Ping))) sensor and an uMP3 player for the audio.

Basically, it worked like this... the ping gets a reference distance that the prop-1 stores as a value.

The code then waited until a person walked through the ping's path (anything less than the reference value set it off).  That started the prop's first motion of banging the lid, pausing for a second and then playing a sound.

The ping then activates again and checks to see if the crowd is still there or has moved on (checking against the reference value again).  If the audience is still there, the prop starts bouncing towards them.  If the audience has already moved on (the ping's present measurement is equal to the reference value) the the code jumps ahead to the third and final animation.

The third and final animation is a series of lid slams and bounces followed by a brief pause and another growling sound playing.

When the prop resets, it gets a new reference distance for the ping since it is entirely possible the prop has physically moved from it's previous location in relation to the wall the ping has been bouncing off of.

Here is a video