Adafruit Tilt Ball Switch is a switch that can detect basic motion/orientation. The metal tube has a little metal ball that rolls around in it, when its tilted upright, the ball rolls onto the contacts sticking out of end and shorts them together.
Adafruit Learn Link: https://learn.adafruit.com/tilt-sensor/
Adafruit Learn Link: https://learn.adafruit.com/costume-triggers-and-switches
Adafruit Learn Link: https://learn.adafruit.com/chirping-plush-owl-toy
Adafruit Web Site: https://www.adafruit.com/product/173