Vibration switch module (KY-002) [S039]
https://www.youtube.com/watch?v=W7pKNvCRH4w
*GitHub : https://github.com/rdiot/rdiot-s039.git
* Specs
This switch is OFF in the resting state, when the external force to touch and to achieve a proper vibration, meet the appropriate speed or from the (partial) heart, conductive pin will momentarily conduction (ON) status, make changes in electric property, and disappear when the external force electric property open (OFF) state is restored
Omnidirectional, any Angle can trigger job
Component model: SW-18015P
* Contents
- Connect
S ----- D2
middle ----- 5V
- ----- GND
- Key Code
int pin = 2;
int vibration = digitalRead(pin);
if(vibration == LOW)
{
lcd.setCursor(0,2);
lcd.print("vibration=detected");
delay(100);
}
else{
lcd.setCursor(0,2);
lcd.print("vibration=NONE ");
}
'2) Sensor > Vibration_Collision' 카테고리의 다른 글
Crash Collision Sensor Detection Module [S230] (0) | 2017.09.24 |
---|---|
Ceramic Piezo Vibration Sensor [S133] (0) | 2016.09.09 |
Knock sensor module (KY-031) [S040] (0) | 2016.09.09 |