Ks0037 keyestudio Vibration Sensor

From Keyestudio Wiki
Revision as of 15:51, 14 November 2017 by Keyestudio (talk | contribs) (→‎Buy from)
Jump to navigation Jump to search

Introduction

What's the simplest way to check vibration with Arduino? Well, use a vibration sensor from keyestudio. You can directly plug it on our sensor Shield V5, vibrate this sensor, and Arduino can receive a digital signal, making it easy to make computation and programs in Arduino. Despite its simplicity, you can make full use of it with creative thinking, step counting, and crash warning light etc.
thumb

Specification

  • IO Type: Digital
  • Supply Voltage: 3.3V to 5V
  • Size: 40.7*16.7mm
  • Weight: 5g

Connection Diagram


thumb

Sample Code

#define SensorLED     13
#define SensorINPUT   3  //Connect the sensor to digital Pin 3 which is Interrupts 1.
 unsigned char state = 0;
 void setup() 
{ 
  pinMode(SensorLED, OUTPUT); 
  pinMode(SensorINPUT, INPUT);
  attachInterrupt(1, blink, FALLING);// Trigger the blink function when the falling edge is detected
  }
void loop()
{  if(state!=0)
      {
        state = 0;
        digitalWrite(SensorLED,HIGH);
        delay(500);
      }  
      else
        digitalWrite(SensorLED,LOW);
} 
void blink()//Interrupts function
{  state++;
}

Resources

Video

http://www.keyestudio.com/wp/2016/05/ks0037-keyestudio-vibration-sensor/

Datasheet

http://www.keyestudio.com/files/index/download/id/1463650958/

Buy from

Official Website

http://www.keyestudio.com/keyestudio-vibration-sensor-for-arduino.html

Amazon Store

https://www.amazon.com/Keyestudio-Vibration-Sensor-Arduino-raspberry/dp/B0172UX49O/ref=sr_1_1?ie=UTF8&qid=1479957104&sr=8-1&keywords=keyestudio+Vibration+Sensor+for+Arduino