Note
Hello, welcome to the SunFounder Raspberry Pi & Arduino & ESP32 Enthusiasts Community on Facebook! Dive deeper into Raspberry Pi, Arduino, and ESP32 with fellow enthusiasts.
Why Join?
Expert Support: Solve post-sale issues and technical challenges with help from our community and team.
Learn & Share: Exchange tips and tutorials to enhance your skills.
Exclusive Previews: Get early access to new product announcements and sneak peeks.
Special Discounts: Enjoy exclusive discounts on our newest products.
Festive Promotions and Giveaways: Take part in giveaways and holiday promotions.
👉 Ready to explore and create with us? Click [here] and join today!
Tilt Switch
The tilt switch used here is a ball-type switch containing a metal ball inside. It is designed to detect small angular inclinations.
Working Principle
The operation of the tilt switch is straightforward: - When the switch is tilted at a certain angle, the metal ball inside rolls and makes contact with two terminals, completing the circuit and triggering the connected system. - When the switch is not tilted, the ball remains away from the contacts, breaking the circuit and leaving it inactive.
This simple yet effective mechanism makes the tilt switch ideal for detecting changes in orientation or inclination.

Example
2.6 Tilt It! (For MicroPython User)
7.5 Creating a “10 Second” Game (For MicroPython User)
2.6 Tilt It! (For Arduino User)
