Raspberry Pi 4 Released! Shipping may take a little longer than usual!
Adafruit Tilt ball switch
The "poor man's" accelerometer! Tilt sensors are switches 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.