A motion detector connected to a Raspberry Pi tracks your movements during you are asleep. The movements are saved in a file you can analyze statistically. Did you sleep well?
#Connections
Motion Detector -> Raspberry Pi
VCC -> Pin2 (5V)
OUT -> Pin6 (signal @ GPIO14)
GND -> Pin6 (ground)