Things used in this project

Schematics

Doorbell
Doorbell

Code

Doorbell.inoArduino
#define BLYNK_PRINT Serial
#include <SPI.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>
#include <SimpleTimer.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";

SimpleTimer timer;

WidgetLCD lcd(V1);

void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth);

  while (Blynk.connect() == false) {
    // Wait until connected
  }
}
void notifyOnButtonPress()
{
  // Invert state, since button is "Active LOW"
  int isButtonPressed = !digitalRead(2);
  if (isButtonPressed) {
    BLYNK_LOG("Button is pressed.");

    Blynk.notify("Please open up! Somebody is on the door!");
     lcd.clear(); //Use it to clear the LCD Widget
  lcd.print(4, 0, "Open"); // use: (position X: 0-15, position Y: 0-1, "Message you want to print")
  lcd.print(4, 1, "The Door!");
  }
}

void emailOnButtonPress()
{

  int isButtonPressed = !digitalRead(2); // Invert state, since button is "Active LOW"

  if (isButtonPressed) // You can write any condition to trigger e-mail sending
  {
    BLYNK_LOG("Button is pressed."); // This can be seen in the Serial Monitor
    Blynk.email("kaustubhagarwal18@gmail.com", "Subject: Doorbell", "Please open up! Somebody is on the door!");
     lcd.clear(); //Use it to clear the LCD Widget
  lcd.print(4, 0, "Open"); // use: (position X: 0-15, position Y: 0-1, "Message you want to print")
  lcd.print(4, 1, "The Door!");

  }
}

void loop() {
  // put your main code here, to run repeatedly:
  Blynk.run();
  timer.run();
}

Credits

11705524 10207718519433933 871861552687634133 o
Kaustubh Agarwal

IOT Enthusiast

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Guess the Number With Arduino KeyPad
Easy
  • 51
  • 3

Full instructions

A simple and funnies project with an Arduino UNO and the famous keypad shield. Arduino selects a random number, you guess the number.

Control a 7 Segment Display with a keypad!
Easy
  • 70
  • 2

Full instructions

In this project I'll show you a simple way to control a 7 Segment Display with a keypad!

Potentiometer with RGB LED
Easy
  • 33
  • 2

This uses potentiometers to control a RGB LED.

Using 9 Axes Motion Shield with Arduino
Easy
  • 13
  • 1

Protip

The Arduino 9 Axes Motion Shield allows your Arduino to measure movement: orientation, acceleration and magnetic field.

Launch Pad Count Down Sequence Display
Easy
  • 70
  • 2

Work in progress

A 7 Segment Display of a Countdown from 9 to 0 for a Launch Pad Control Panel.

Know the Temp of Your Home From Anywhere with Arduino Cloud!
Easy
  • 1,934
  • 11

Full instructions

Ever wanted to know the temperature of your home from somewhere? Here's an easy way to do it with Arduino Cloud and the Yun Shield!

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaFree StoreBlog