Project tutorial
Vibration Sensor Module

Vibration Sensor Module © GPL3+

I will explain how connect Arduino with Vibration sensor and LED.

  • 34,076 views
  • 2 comments
  • 11 respects

Components and supplies

Apps and online services

About this project

In this project, we will connect Arduino with Vibration sensor and LED. When no vibration is detected, Vibration sensor output is 0 (low voltage),otherwise its output is 1(high voltage)。 If Arduino get 0 (no vibration) from vibration sensor it will turn on green LED and turn off Red LED. If Arduino get 1 from vibration sensor, it will turn on Red LED and turn off green LED.

Code

Vibration Sensor Module (Code)Arduino
int vib_pin=7;
int led_pin=13;
void setup() {
  pinMode(vib_pin,INPUT);
  pinMode(led_pin,OUTPUT);
}

void loop() {
  int val;
  val=digitalRead(vib_pin);
  if(val==1)
  {
    digitalWrite(led_pin,HIGH);
    delay(1000);
    digitalWrite(led_pin,LOW);
    delay(1000);
   }
   else
   digitalWrite(led_pin,LOW);
}

Schematics

Vibration Sensor Module
Vibration sensor module mgazacbgvc

Comments

Similar projects you might like

touch sensor

Project tutorial by user253146

  • 8,180 views
  • 3 comments
  • 4 respects

Arduino UNO and Vibration Sensor with Relay

Project tutorial by MichDragstar

  • 286 views
  • 0 comments
  • 5 respects

Touch Sensor and Sound Sensor Controlling AC/DC Lights

Project showcase by Anbumachi

  • 1,178 views
  • 2 comments
  • 5 respects

Hall effect sensor with Arduino

Project tutorial by AMAL NS

  • 9,420 views
  • 1 comment
  • 22 respects

Amazing Binary Clock using LED Matrix Module

Project tutorial by LAGSILVA

  • 9,351 views
  • 10 comments
  • 50 respects
Add projectSign up / Login