Ks0117 keyestudio EASY plug Vibration Sensor Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
Line 53: Line 53:


==Buy from ==
==Buy from ==
'''Official Website'''


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


[[category:Module]]
[[category:Module]]

Revision as of 11:52, 15 November 2017

EASY plug Vibration Sensor Module


thumb

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.
Note: this module needs to be used together with EASY plug control board.


Specification

  • Interface: Easy plug
  • Sensor type: Digital
  • Supply Voltage: 3.3V to 5V
  • Size: 46.4*16.6mm
  • Weight: 7g


Connection Diagram


thumb


Sample Code

#define SensorLED     13
#define SensorINPUT   7  //Connect the sensor to digital Pin 7 which is Interrupt 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

Datasheet

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

Buy from

Official Website

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