The KY-020 Tilt Switch Sensor module is a switch that reacts to movement.
It closes the circuit when it’s tilted to the side as long as it is moved with enough force and degree of inclination to activate the ball switch inside.
Compatible with Arduino, Raspberry Pi, ESP32 and other microcontrollers.
For more sensitive tilt detection use the KY-017 mercury tilt switch.