Connecting the PIR module to the internet

Everything that we did until now can also be achieved with an Arduino, so where is the value added by the ESP8266? Well, what if you receive a notification as an email and a sound on your phone when a motion is detected at home. Also, you can later combine the detected motion with turning on lights, the TV, or turning on an alarm siren.

In order to do this, we will use a library named blynk that can be downloaded from the following link:

https://github.com/blynkkk/blynk-library or their mobile application.

Now we shall see how to set it up:

  1. First let's download and install the library:
  1. Click the Download ZIP button. Then go to Sketch | Include Library | Add .ZIP library...:
  1. Locate the downloaded ZIP file and install the library.

It's time now to install the Android application so we can use it later:

  1. Go to Google Play Store and search for Blynk - Arduino, ESP8266, Rpi, and install the application:
  1. Let's focus first on the Android application. Open the application and create an account in the Blynk application:
  1. After that, click on New Project, set the project name, the hardware type to ESP8266, the theme for your application - dark or light, and continue by pressing the Create button. The project is created and an email with a token is sent to your email address used for registration. Also, this token can be found later in the Project Settings tab:
  1. Now the project is created, the token is on the email and we are in the main screen application from where we can add LEDs and notifications on to it. In order to do that press the + icon:
  1. After you have added all the elements, the main screen of your application needs to look like this:
  1. Now it is time to configure the LEDs to some virtual pins (V1 and V2), add the email address where the notification will be sent, and set up the sound that will be played by your phone if the device is going offline or a new notification is sent by the Blynk cloud server:

Virtual LED 1:

The Virtual LED 2:

The Email Settings:

The Notification Settings:

In this moment, the application is ready to be started. If you want to skip all these steps for creating the elements, you can scan the following QR code that will add and set up everything for you. You will just need to change the email address in the email notification element.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.177.14