The RPI-1031 Tilt-a-Whirl is a tilt sensor on a breakout board that senses a change in orientation in four different directions. Internally, the sensor has optical sensors that are blocked when a small metal ball rolls in the direction of the orientation change. The sensor then outputs a signal indicating which side the ball is touching.