Rohan Barnwal
Created June 20, 2020

Non Contact and Notification Based Door Bell

Hi guys it's me Rohan Barnwal welcome back with another project in this project I teach you how to create notification based door bell

BeginnerFull instructions provided2
Non Contact and Notification Based Door Bell

Things used in this project

Hardware components

NodeMCU ESP8266 Breakout Board
NodeMCU ESP8266 Breakout Board
×1
Ir Sensor
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×1

Software apps and online services

Arduino IDE
Arduino IDE
Blynk
Blynk

Story

Read more

Schematics

Connection

Code

Code

Arduino
 
//Created By Rohan Barnwal
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
BlynkTimer timer;
char auth[] = " "; //Auth code sent via Email
char ssid[] = ""; //Wifi name
char pass[] = "";  //Wifi Password
int flag=0;
void notifyOnThings()
{
  int isButtonPressed = digitalRead(D1);
  if (isButtonPressed==1 && flag==0) {
    Serial.println("Rohan Someone in the House");
    Blynk.notify("रोहन कोई है तुम्हारे गेट में");
    flag=1;
  }
  else if (isButtonPressed==0)
  { 
    flag=0;
  }
}
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, ssid, pass); 
pinMode(D1,INPUT_PULLUP);
timer.setInterval(50L,notifyOnThings); 
}
void loop()
{
  Blynk.run();
  timer.run();
}

Credits

Rohan Barnwal

Rohan Barnwal

7 projects • 6 followers

Comments