Tilt SW-520D Sensor (SW-520D) [S067]
https://www.youtube.com/watch?v=AbBB5RE9uQs
*GitHub : https://github.com/rdiot/rdiot-s067.git
* Specs
Max voltage : 20V
Max current : 0.3A
* Contents
- Connect
1 ---- 5V
2 ----- R220 ----- D2
------ GND
- 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 |
Mini Mercury Switch Module (KY-017) [S049] (0) | 2016.09.08 |
Tilt SW-200D Sensor (W-200D) [S051] (0) | 2016.09.08 |