44
Lesson 15 Tilt-Switch
Introduction
The tilt switch sensor module is a ball tilt switch with a metal ball inside. It is used to detect
inclinations of a small angle.
Components
-
1 * SunFounder Uno board
- 1 * USB data cable
- 1 * Tilt-switch module
- Several jumper wires
Experimental Principle
Apply the principle that the ball in the switch moves with different angles of inclination to
make triggering circuits. The tilt switch module uses a ball tilt switch with bidirectional
conduction. When it tilts towards either side, as long as the tilt degree and force meet the
condition, the switch will be energized; thus, it will output low level signals.
In this experiment, we use a tilt switch module and an LED that has been attached to pin 13
of the SunFounder board to build a simple circuit.
With the LED attached to pin 13, connect pin S to D2 of SunFounder Uno board. When the
Tilt-switch inducts tilt signals, the LED will be on. Otherwise, it will be off.
Experimental Procedures
Step 1:
Build the circuit
Tilt-switch Module SunFounder Uno
S --------------------------------- D2
- ------------------------------ GND
+ ------------------------------- 5V
Step 2:
Program (Please refer to the example code in
LEARN -> Get Tutorial
on our
website
)
SunFounder