Arduino Tutorial 36: Understanding How to Use Tilt Switches in Your Projects

Tilt Sensor
This Circuit Gives Visual Indicator if Board Has Been Tilted

This is a simple project that allows you to create a circuit which will give a visual indication if the breadboard has been tilted. In the upright position, the Green LED is illuminated. To the left of the board is a tilt switch. If the project is tilted, the switch will go from the closed to the open condition. This can be detected on the arduino, and then the red LED is illuminated. The video below explains how to do this simple project.

An official Arduino Uno R3 is available HERE. In this new series of lessons, I will be using the sensor and other components found in this KIT.

You should create your own code based on the instructions in the video, but if you are having trouble, I include the code developed in the video below: