Tilt Switch Sensor Module
From Wiki
Introduction
The tilt-switch module (as shown below) in this kit is a ball tilt-switch with a metal ball inside. It is used to detect inclinations of a small angle.
Resource
Test Experiment for Arduino
Test Experiment for Raspberry Pi