SunFounder ESP32 Starter Kit
5.21 Tilt Switch
The tilt switch used here is a ball one with a metal ball inside. It is used to detect inclinations of a small angle.
The principle is very simple. When the switch is tilted in a certain angle, the ball inside rolls down and touches the two
contacts connected to the pins outside, thus triggering circuits. Otherwise the ball will stay away from the contacts,
thus breaking the circuits.
• SW520D Tilt Switch Datasheet
Example
736 Chapter 5. Learn about the Components in Your Kit