Surilli
Published © LGPL

Detect Vibration and Tilt with Ball Sensor and Surilli WiFi

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

BeginnerFull instructions provided9 minutes543
Detect Vibration and Tilt with Ball Sensor and Surilli WiFi

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 WiFi
Surilli WiFi
×1
KY-020 Ball Sensor
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Detect vibration and tilt with Ball sensor and Surilli WiFi

File missing, please reupload.

Code

Ball_Sensor

C/C++
int Led = 5;// define LED Interface
int buttonpin = 4; // 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 4 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