Surilli
Published © LGPL

Detect Vibration and Tilt with Ball Sensor and Surilli GSM

It can only detect large changes when it's tilted. For example, opening or closing of a door, etc.

BeginnerFull instructions provided9 minutes484
Detect Vibration and Tilt with Ball Sensor and Surilli GSM

Things used in this project

Hardware components

Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×5
LED (generic)
LED (generic)
×1
Surilli GSM
Surilli GSM
×1
KY-020 Ball Switch Sensor
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Detect vibration and tilt with Ball sensor and Surilli GSM

Code

Ball_Sensor

C/C++
int Led = 5;// define LED Interface
int buttonpin = 3; // define Sensor Interface
int val = 0;// define numeric variables val
void setup ()
{
 pinMode (Led, OUTPUT) ;// define LED as output interface
 pinMode (buttonpin, INPUT) ;// output interface is defined of sensor
}
void loop ()
{
 val = digitalRead(buttonpin);// digital interface will be assigned a value of pin 3 to read val
 if (val == HIGH) // When the change is detected module detects a signal, LED flashes
 {
   digitalWrite (Led, HIGH);
 }
 else
 {
   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