Main functional blocks:
- Custom controller-application written in C#, running on my PC.
- Audio-player application, also written in C# using managed DirectX (www.sharpdx.org) and XAudio2. Multi-channel/Polyphonic.
- I/O Expander created using a Parallax Propeller (8 core microprocessor, 80 MHz), communicating with PC over serial/USB port. Handles all Input/Output like pressure mat input, relay-control for spider, PWM and quadrature encoding for skeleton motor, plus DMX light control.
- DMX-controlled light fixtures and dimmer pack
- Spider lift using pneumatics (air cylinder powered by air compressor and solenoid valve)
- Skeleton on track in ceiling
- When no visitors are present the system will play random tracks from this CD. Some of the lights will flicker/pulsate.
- Visitor walks up the stairs leading to our porch. A DIY pressure mat (http://supersoda.com/detail.php?id=00000000036) triggers a digital input on the Propeller controller, which sends a command over a serial port to a PC running my custom C# application.
- All lights turn off, a sound effort of a creaking door is played, mixed with the violin screech sound from the Psycho movie.
- After a few seconds the spider is coming down and a red strobe that is pointing to it will flash. The spider is then raised again.
- Flashing multi-color strobe light directed at stationary skeleton and another sound effect played
- After a few moments another flashing multi-color strobe light turns on, combined with audio.
- Finally a laughter is played, white strobe light is going and the fish line mounted skeleton is moving towards the visitor! The skeleton will stop after a few feet and then go back after a few seconds.
- The visitor can now grab some candy. The system resets back for another visitor after a minute to allow some time to step off the porch without triggering another sequence.
Sample code from main controller C# application:
audioPlayer.PauseBackground(); audioPlayer.PlayEffect("Door-creak"); instance.WaitFor(TimeSpan.FromSeconds(2)); audioPlayer.PlayEffect("Violin screech"); blinkyEyesLight.JumpToLevel(0); instance.WaitFor(TimeSpan.FromSeconds(2)); audioPlayer.PlayEffect("Scream"); spiderLight.SetStrobe(Color.Red, 200); spiderMover.SetOutput(true);
#1 by Stacy Park on October 26, 2012 - 2:47 pm
I’d love to see videos of your projects.
#2 by hakanl on October 26, 2012 - 2:55 pm
It’s coming! 🙂