Tilt Sensor
In this project, you'll learn how to connect and use a tilt sensor to automatically turn on and off a LED.
A tilt sensor is a simple on-off switch for turning on and off an electric signal depending on whether the sensor is tilted or not. The switch is connected (on) when not tilted, and disconnected (off) when tilted.
Parts needed:
| ||
1 | Making the connections
| |
2 | Create a new Bare Minimum program and type in this program.
The tilt sensor is connected to pin 2. We use the interal LED that is connected to pin 13. The The The | |
3 | Run the program.
Tilt the sensor and observe the internal LED on the Arduino board. | |