Ks0025 keyestudio Digital Tilt Sensor: Difference between revisions
Jump to navigation
Jump to search
Keyestudio (talk | contribs) No edit summary |
Keyestudio (talk | contribs) No edit summary |
||
Line 38: | Line 38: | ||
}</pre> | }</pre> | ||
== | ==Resources == | ||
'''Video''' | |||
http://www.keyestudio.com/wp/2016/05/ks0025-keyestudio-digital-tilt-sensor/ | http://www.keyestudio.com/wp/2016/05/ks0025-keyestudio-digital-tilt-sensor/ | ||
'''Datasheet''' | |||
http://www.keyestudio.com/files/index/download/id/1463649603/ | |||
==Buy from == | |||
http://www.keyestudio.com/keyestudio-digital-tilt-sensor.html | |||
https://www.amazon.com/Keyestudio-Digital-Sensor-Arduino-raspberry/dp/B0171PTELM/ref=sr_1_1?ie=UTF8&qid=1479871047&sr=8-1&keywords=keyestudio+Digital+Tilt+Sensor | |||
[[Category: Sensor]] | [[Category: Sensor]] |
Revision as of 11:19, 23 November 2016
Introduction
Tilt Sensor is a digital tilt switch. It can be used as a simple tilt sensor. Simply plug it to our IO/Sensor shield; you can make amazing interactive projects. With dedicated sensor shield and Arduino, you can achieve interesting and interactive work.
Specification
- Supply Voltage: 3.3V to 5V
- Interface: Digital
- Size: 30*20mm
- Weight: 3g
Connection Diagram
Sample Code
int ledPin = 13; // Connect LED to pin 13 int switcher = 3; // Connect Tilt sensor to Pin3 void setup() { pinMode(ledPin, OUTPUT); // Set digital pin 13 to output mode pinMode(switcher, INPUT); // Set digital pin 3 to input mode } void loop() { if(digitalRead(switcher)==HIGH) //Read sensor value { digitalWrite(ledPin, HIGH); // Turn on LED when the sensor is tilted } else { digitalWrite(ledPin, LOW); // Turn off LED when the sensor is not triggered }
Resources
Video
http://www.keyestudio.com/wp/2016/05/ks0025-keyestudio-digital-tilt-sensor/
Datasheet
http://www.keyestudio.com/files/index/download/id/1463649603/
Buy from
http://www.keyestudio.com/keyestudio-digital-tilt-sensor.html