A simple roller ball tilt sensor or movement switch. A small axial device which will close the contact terminal at either end with the metal case when tilted. A SPDT switch with the case as the common, connecting to either end pin. Note it is possible that no connection is made when level.