1)Object:
In this project, we will use Arduino to get signal from tilt sensor. When sensor is tilt, Arduino will turon LED otherwise the LED will turn off.
2)Devices and parts:
Arduino UNO R3 x 1;
USB cable x 1;
Tilt switch sensor x 1;
Jump wires.
Circuit graph
4)Download sample code from following link:
Get tilt switch Arduino sample code here
Load above code into Arduino IDE and you will see result as following:
5:Result
Put tilt sensor in horizon position,LED is off. See following picture:Tilt the sensor in some angle, LED is on. see following picture:
DownLoad Url osoyoo.com