Surilli
Published © LGPL

Detect Vibration Using Mercury Tilt Sensor and Surilli Basic

The mercury switch provides a digital signal upon changing its position, which can be used for security purposes in doors, etc.

BeginnerFull instructions provided15 minutes490
Detect Vibration Using Mercury Tilt Sensor and Surilli Basic

Things used in this project

Hardware components

Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Surilli Basic
Surilli Basic
×1
Light Cup Sensor
×1
LED (generic)
LED (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Detect vibration using Mercury Tilt sensor and Surilli Basic

Code

Mercury_Sensor

C/C++
int vibration_sensor =6;
int led =5;
void setup() {
 pinMode(vibration_sensor, INPUT);
 pinMode(led, OUTPUT);
 SerialUSB.begin(9600);
}
void loop() {
 delay(500);
 int Sensor = digitalRead(vibration_sensor);
 if(Sensor == 1){
   SerialUSB.println("Value1");
   digitalWrite(led, HIGH);
   }
   if(Sensor == 0){
   SerialUSB.println("Value2");
   digitalWrite(led ,LOW);
   }
}

Credits

Surilli

Surilli

196 projects • 62 followers
Surilli is a premiere Internet of Things centric Technology Company aimed at providing cutting edge innovative solutions.

Comments