This is a pretty quick hack to trigger sound and lightning flashes for a simple Halloween Haunt. It uses a light dependent resister to detect a shadow passing over the sensor. An Arduino reads the sensor and triggers a sound to be played and simulates lightning by flashing a bright LED. The sound is played from a Radio Shack digital recording module.
It also shows how to simulate a button press on another device by using an optocoupler.