Mailbox Notification Using Blynk App

INTRODUCTION

I always forget to check my mailbox📫. Each time I checked, there was no new letter for me📭. But when I didn’t check the mailbox, there was an important letter for me😭. To prevent this from happening again🧐, I decided to make this mailbox notification💪🏼.

You can also do this for “Assignment Box📥”, especially for lecturers. This can help to notify you when students submit their assignments.

🎬Watch this video for more info on how to make a mailbox with notification using Maker UNO and Blynk App.

HARDWARE PREPARATION

This tutorial use :

Sample Code

This is the sample code used for this tutorial. Try it!

#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";
// Hardware Serial on Mega, Leonardo, Micro…
//#define EspSerial Serial1
// or Software Serial on Uno, Nano…
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX
// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600
ESP8266 wifi(&EspSerial);
int sensorPin = 7; // Input pin for the IR sensor
int count = 0; // Mail counter
String stringOne = "You got ";
String stringTwo;
String stringThree = " new mail.";
String message;
boolean prevState = false;
void setup()
{
// Debug console
Serial.begin(9600);
delay(10);
// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
delay(10);
Blynk.begin(auth, wifi, ssid, pass);
}
void loop()
{
Blynk.run();
int state = digitalRead(sensorPin);
if ( state == LOW && prevState == true) {
count++;
stringTwo = count;
message = stringOne + stringTwo + stringThree;
Blynk.notify(message);
}
prevState = state;
}
BLYNK_WRITE(V1)
{
count = 0;
}

Reference

  1. Blynk – Notification

Thank you

Thank you for reading this tutorial and we hope it helps your project development. If you have any technical inquiry, please post at Cytron Technical Forum.

2 thoughts on “Mailbox Notification Using Blynk App”

Leave a Comment

Your email address will not be published.

Share this Tutorial

Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest
Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest

Latest Tutorial

Smart Door Announcer with Raspberry Pi
Why Raspberry Pi is the future of computing devices?
Face Recognition Door Lock System Using OpenCV on Raspberry Pi
Send Data to Firebase Using Arduino Uno WiFi Rev2
Simple Alarm System Using Maker Nano
Scroll to Top