Surilli
Published © LGPL

Detect Motion and See Results on Mobile Application

Detect motion in your surroundings and see results on your mobile application (Blynk), you can also perform different tasks from output.

IntermediateFull instructions provided30 minutes667
Detect Motion and See Results on Mobile Application

Things used in this project

Hardware components

Jumper wires (generic)
Jumper wires (generic)
×3
Breadboard (generic)
Breadboard (generic)
×1
Surilli WiFi
Surilli WiFi
×1
PIR Motion Sensor (generic)
PIR Motion Sensor (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

image_2d4uuivrdj_AnpauZN3S3.jpg

Code

Untitled file

C/C++
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "24f7d872b7ba4b669ed1bef17ca59ec6";
char ssid[] = "HUAWEI Mate 10 lite";
char pass[] = "12345678";
int motion_Sensor_Pin = 16;
void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
  Serial.begin(9600);
  pinMode (motion_Sensor_Pin, INPUT);
}
void loop()
{
  Blynk.run();
  Blynk.syncAll();
}
BLYNK_READ(V0) 
{
  int sensor_value = digitalRead(16);
  if (sensor_value == 1)
  {
    Blynk.virtualWrite(V0, "Motion Detected");
    Serial.println(sensor_value);
    WidgetLED led1(V1);
     led1.on();
    delay(100);
  }
  else if (sensor_value == 0)
  {
    Blynk.virtualWrite(V0, "NO Motion Detected");
    Serial.println(sensor_value);
     WidgetLED led1(V1);
     led1.off();
    delay(100);
  }
  }

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