3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Solid-state Halloween controller and how to build a Haunted House

Step 7Write the code

Write the code
Once you have made soundtrack, write the controlling code. Here’s a C code fragment to help get you started (check http://www.hytherion.com/beattidp/comput/pport.htm for information on using inpout32.dll) : halloween.cpp, below. Once the sequence is started, the computer plays the soundtrack and syncs peripheral devices through the controller. In this particular setup, which uses the halloween2002.wav soundtrack mentioned above, I would explain to trick-or-treaters that they came just in time to witness an execution. After some thunder and lightning, a small motor would trigger the blade of a guillotine, built from cardboard, aluminum foil, and modular extrusion (8020, borrowed from work) to fall. As a rubber mask stuffed with a pillow fell into a basket, warm water sprayed onto the trick-or-treaters resulting in shrieks, shouts, and frantic brushing to remove the “blood.” I then offered candy from a basket with a duplicate mask stuffed with spaghetti, tomato sauce, and beets. Everyone choose the candy. While this sequence ran open loop through pre-programmed maneuvers, adding feedback to make the display responsive to sounds or motion is quite doable.


« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
702
Followers
140
Author:ewilhelm
Eric J. Wilhelm is the founder of Instructables. He has a Ph.D. from MIT in Mechanical Engineering. Eric believes in making technology accessible through understanding, and strives to inspire others ...
more »