This project combines the idea of IOT and Smart Home electronics in one useful project. The project aims to save your time checking your mailbox by simply sending you notifications to your mobile phone if you get new mail. With one of the features offered in this project, connection coverage, you are able to check your mailbox at home from any place in the world.
Detect if there is new mail inside your mailbox.
Notify the user by the mobile app with the detection result.
The HC-SR04 ultrasonic sensor uses sonar ultrasonic waves to determine distance to an object. It offers excellent non-contact range detection with high accuracy and stable readings. Its operation is not affected by sunlight or black material. It comes complete with an ultrasonic transmitter and receiver module.
You can find the User’s Manual for the HC-SR04 ultrasonic sensor here.
With Blynk, you can build interfaces by using widgets to control and monitor hardware projects from your iOS and/or Android devices. Blynk supports Arduino, Raspberry Pi, ESP8266, Particle Core, and other common microcontrollers.
There are other platforms that allow you to control hardware over the internet. For this project, however, we will use Blynk, which is very user-friendly.
A few things you should notice in the sketch:
char auth = ” “;
This line in the mailbox.ino sketch should be filled with your own auth token that you get when create your app.
For this line in the setup function, you should replace “WI-FI Network” by your own Wi-Fi network name. The same goes for “Wi-Fi PASSWORD”
In addition to Getting Started on Blynk, here is a step-by-step guide on how you can create your app with screenshots:
1) After logging on with your account details, you will see this screen:
2) After pressing “Create New Project” enter your project title and choose “ESP8266” as your hardware model.
3) It’s very important that you save the Auth Token since we will add it to our main sketch on ESP8266. You have an option to send it on the same email you are logged in with by simply pressing e-mail.
4) Once sending is done, you can click “Create” to complete creating your project. After creating your project, you will be ready to add widgets to your app.
5) Press add “+” from the top right corner of the screen. All widget boxes will be visible for you, then drag the LCD widget to your workspace.
6) For our system, we only need LCD but enjoy playing around with all widgets available.
There are 2 ways to print on the LCD (Simple or Advanced). This tutorial introduces the advanced way.
7) Press “O Screen” under COLORS to change LCD backlight; the same goes for “(T) Text” and text color.
Now you should connect the LCD to a virtual pin so it can communicate with ESP8266 over the Blynk server.
In the main sketch, I connected the LCD with Virtual pin 1.
8) Now the app is ready to interact with your hardware system.
9) Upload the sketch to ESP8266 and run your app on Blynk.
If you don’t have any mail you will get this message on the LCD:
If you did get mail in your mailbox, you will see this message on your screen instead:
Now, you can save your time by checking your mailbox only when you receive mail.