Mini Mercury Switch Module (KY-017) [S049]
https://www.youtube.com/watch?v=TzuxDa6xQ-g
*GitHub: https://github.com/rdiot/rdiot-s049.git
* Specs
Working voltage: 3.3V~5V
digital switch output (0 & 1)
High sensitivity
With fixed bolt hole for easy installation
Works with Official Arduino Boards
Application: For Arduino DIY project
Forum link: https://www.facebook.com/123Neonado
Material PCB
Dimensions: 31 x 15 x 8 mm / 1.22 x 0.59 x 0.31 inch
Weight: 2 g / 0.07 oz
Color: Black
* Contents
- Connect
- ----- GND
middle ----- 5V
S ----- D2
- Key Code
int pin = 2;
int val = digitalRead(pin);
if(val == LOW)
{
lcd.setCursor(0,2);
lcd.print("Tilt CLOSE");
}
else
{
lcd.setCursor(0,2);
lcd.print("Tilt OPEN ");
}
'2) Sensor > Tilt' 카테고리의 다른 글
RPI-1031 Angle Sensor Four Direction Sensor (RPI-1031) [S183] (0) | 2016.09.08 |
---|---|
Tilt Switch Module (KY-020) [S050] (0) | 2016.09.08 |
Tilt SW-520D Sensor (SW-520D) [S067] (0) | 2016.09.08 |
Tilt SW-200D Sensor (W-200D) [S051] (0) | 2016.09.08 |