Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Build Iot based home automation project using blynk and Esp8266 nodemcu

The Internet of Things is the concept of everyday objects – from industrial machines to wearables – using built-in sensors to collect data and act on the data over the network. For example, a new building development project could be fitted with sensors to automatically adjust heating and lighting. Or production equipment that alert maintenance personnel of impending failure. In short, the Internet of Things is the future of technology that can make our lives more efficient.

For decades we have been fascinated by small-scale gadgets (think of spy movie types) – but only in the last few years have we seen the true potential of the Internet of Things. As the wireless Internet becomes more popular, embedded sensors become more and more complex, and people are beginning to realize that technology can be a personal tool and even a professional tool.

The term “Internet of Things” was coined by entrepreneur Kevin Ashton in the late 1990s. Ashton is one of the founders of the MIT Auto-ID Center, a member of a team that discovered how to link objects to the Internet via RFID tags. He said that he used the term “Internet of Things” for the first time in a 1999 speech – the word has been around since then.

Everyone wanted to build an internet of things project, as IOT project required programming skills. But don’t worry about this project I will be using a user-friendly tutorial so everyone can easily develop an IOT project. In this tutorial, I will describe how to build an IoT based home automation system using a nodemcu and an Android/IOS app called Blynk. As I said before there will no programming skills are necessary for this IOT project. So, without wasting more time let’s get started.

Collect the Requirements

  • Android Blynk app (Playstore) (IOS)
  • Arduino IDE
  • Blynk Library for Arduino IDE
  • Buy Nodmcu Esp8266
  • Buy 5volt relay module
  • Some jumper cable

Configure the Blynk app

Simply download the app and follow the below step as I mention below, just signup into your Facebook and create your account on  Blynk. After this create a new project and give the name to your project as I did “Home Automation”.Select the device as NodeMCU because we are using NodeMCU module. In the third option select Wi-Fi.

add a simple on-off button and select the pin 2 in the digital or select the other pin according to your hardware wiring. you can also choose other pins for more than 1 switches Please go through NODEMCU Pinouts.

Nodmcu Pinout

Arduino IDE Configuration

First of all download and install the Arduino Ide, Also your ArduinoIDE needs to know that you want to use this NodeMcu module. That is, you need to select the right board. Confused?

Well, it’s very simple!

Go to File> Preferences

add this URL in the additional  URL manager

http://arduino.esp8266.com/stable/package_esp8266com_index.json

as i mention below in the image.

After this go to, Tools > Board > Boards Manager, and search for the esp8266

After the installation just adds the blynk library, Download the blynk library and simply unzip the library file into Desktop\Documents\Arduino\libraries folder or you can follow the step below.

Download the library of Blynk

After the downloading just add the library file into Arduino ide.

In the next step, we will connect the nodemcu module to the computer using micro USB and upload the code.
follow these steps for uploading the code

Tools>Board> Select “Nodemcu 0.9”

in the next step select your Com port and upload the code.

Tools>Port>Com4

upload the code

simple copy and paste the below  code, change the SSID and PASS with your Wifi Credentials and hit to upload button

#define BLYNK_PRINT Serial

#include
#include

// 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”;

void setup()
{
// Debug console
Serial.begin(9600);

Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, “blynk-cloud.com”, 8442);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);
}

void loop()
{
Blynk.run();
}

Wiring

After uploading the code just wire up everything as mention below in the fritzing diagram and things will start working smoothly.

The post How to Build Iot based home automation project using blynk and Esp8266 nodemcu appeared first on TectoGizmo.



This post first appeared on TectoGizmo - Bringing Tech Home, please read the originial post: here

Share the post

How to Build Iot based home automation project using blynk and Esp8266 nodemcu

×

Subscribe to Tectogizmo - Bringing Tech Home

Get updates delivered right to your inbox!

Thank you for your subscription

×