I plan to interface a Zeo alarm clock's (http://myzeo.co.uk/pages/what-is-zeo/) serial port to the RasPi to monitor sleep stages, then during a period of REM sleep close to my waking time, play a sound or spoken phrase in an attempt to trigger a period of lucid dreaming. The 3.5mm audio output will be of sufficient quality. It will drive a 1W amplifier and a small loudspeaker. I'm hoping to run the RasPi headless over WiFi.
I don't hold out much hope of this causing a transition to lucidity, but it will be fun trying. I expect the sound will either be incorporated into the dream somehow, or will just wake me up!