loading

Hey guys!! How are you ? This time I have got an interesting project with the latest Node MCU esp8266 12E Development board in combination with one of the best app for Internet of things -BLYNK App.

So it all started when I was wondering on how I can make my IOT project with Arduino and esp8266 wifi module more compact and energy efficient and also a good IOT app with drag and drop facilities . And then I stumbled upon Node MCU esp8266 12E WiFi development board which completely astounded me in terms of what the board had to offer :) and guess what also found about the BLYNK app which was perfect for my needs.

So it was a win -win situation for me as I could get hold of two exciting things for developing projects on IOT

With this awesome board and app in your hand the projects will become more compact and efficient!!

So fasten your seat belt and get ready , we are going to build a simple project were you can control an LED connected with Node MCU board by BLYNK app and whooop!! there you go:)

Step 1: Getting to Know NodeMCU Board

It is an Open-source, Interactive, Programmable, Low cost, Simple, Smart, WI-FI enabled board which can help you to build IOT projects with ultra fast prototyping.

The Development Kit based on ESP8266, integrates GPIO, PWM, IIC, 1-Wire and ADC all in one board. Power your development in the fastest way with NodeMCU Firmware! .

Cost: Around 8$ you can have this powerful board at your command:)

The Only thing that will disappoint is you that , it works on 3V logic and you have to make arrangements when connecting sensors which work on 5V

This board has 30 Pins and refer the Pin diagram for better understanding.

Step 2: Getting to Know

Blynk is a Platform with iOS and Android apps to control Arduino, Raspberry Pi and the likes over the Internet.

Blynk was designed for the Internet of Things. It can control hardware remotely, it can display sensor data, it can store data, vizualize it and do many other cool things.

It's a digital dashboard where you can build a graphic interface for your project by simply dragging and dropping widgets. It's really simple to set everything up and you'll start tinkering in less than 5 mins. Blynk is not tied to some specific board or shield. Instead, it's supporting hardware of your choice. Whether your Arduino or Raspberry Pi is linked to the Internet over Wi-Fi, Ethernet or this new ESP8266 chip, Blynk will get you online and ready for the Internet Of Your Things.

How does it work?

There are three major components in the platform:
Blynk App - allows to you create amazing interfaces for your projects using various widgets we provide.

Blynk Server - responsible for all the communications between the smartphone and hardware. You can use our Blynk Cloud or run your private Blynk server locally. It’s open-source, could easily handle thousands of devices and can even be launched on a Raspberry Pi.

Blynk Libraries - for all the popular hardware platforms - enable communication with the server and process all the incoming and outcoming commands.

Its features:

*Supports majority of development boards like Arduino ,RPI, esp8266

* Easy to use

* Awesome widgets like LCD, push buttons, labelled value, graphs

* Not restricted to local Wifi network

*Direct pin manipulation with no code writing

*Easy to integrate and add new functionality using virtual pins

I guess this should be more than enough to build the project:)

Step 3: Materials Required

Now that we have some insights about the hardware and the app, we require the following components

1. Node MCU Esp8266 12E development board

for my friends in India :follow this link if you want to buy

http://www.amazon.in/ESP8266-NodeMcu-WiFi-Development-Board/dp/B00UY8C3N0

and for my buddies in around the world:

https://www.amazon.com/Diymall%C2%AE-NodeMCU-Devkit-CP2102-Apples/dp/B00UY8C3N0?ie=UTF8&*Version*=1&*entries*=0

2. Smart Phone with Blynk App installed

Note : You better charge your mobile before use:)

3. Led with an 330 ohm resistor

4. Breadboard

5. Arduino IDE v1.6.6

And that's pretty much the list to be satisfied!!

Step 4: Setting Up Blynk With Arduino IDE

This blynk app has set of library files which have to be included in the Arduino IDE environment before the project is executed

1. Follow the link to install libraries

http://www.blynk.cc/getting-started/

2. Once the Zip file is downloaded ,extract it and individually copy all the folder to your libraries folder of your arduino

3. Once done just open Arduino IDE and go to Sketch-> Include libraries and you would see blynk in the menu

4. If you see that then libraries have been included successfully

*Now it is time to include the board configuration in the Arduino IDE

What is board configuration?

Ok , a simple answer is that it contains all the essential parameters which required to get the board booted and configured.

for example in if you go to Tools->Board Menu you would see a list of boards . All this boards listed have different configuration settings. Therefore we should also include NodeMCU's board configurations which typically contain the board architecture , clock speed, baud rate etc.

Lets start. In the Arduino IDE go to File->Preferences

Now Copy the below link and paste it in the Additional Boards Manager Url text box

http://arduino.esp8266.com/stable/package_esp8266c...

Restart the Arduino IDE after that.

Now after restarting the Arduino IDE , go to Tools->Boards and select Node MCU board , mine was version 0.9

Step 5: Setting Up Blynk

1. First install the Blynk app from google play store and then sign in

2. After that Press on click on New Project and you will get a screen (Refer Screen shots)

*Enter the name of your project, I have given it as led

*Then Select the Board as ESP8266

and then you will see below the authentication token no. If you want it in your email you can send it through email also

*And then Finally click on to the create button

3. Now you will get your dashboard screen. Just click on the the top most button "+" on the right corner to add widgets to your project.

4. In this project we add a simple button and then configure its settings as Digital GP13 pin.(Refer Screen Shots)

5. Its your choice you can either have the button set as push type or as a switch

6. Then label the Button as ON and OFF in the settings

Note that since Blynk is free only to an extend, you have to choose your widgets wisely

Step 6: Circuit Diagram:

1. Now According to the Pin mapping diagram of Esp8266 board, D7 pin is the 13th pin. So we would program the pin as 13 in the arduino code which we will shortly upload to the board.

2. The connection is pretty simple just connect the Led to D7 pin via 330/220Ohm resistor .(refer the diagram)

Step 7: Uploading the Code

1.Connect your Esp8266 Wifi to your PC
2. Open Arduino IDE

3. Then go to File->Eamples->Blynk-Boards_Wifi->Esp8266Standalone

(Refer screen shot)

4. Select the correct board (NodeMCU 1.0) and the com port from the Tools Menu

5. A snippet from the code

Serial.begin(9600); // Change Baud Rate to 115200

Blynk.begin(auth, "ssid", "pass"); // Enter your Wifi SSID and password, both inside the double quotation

Finally Save the file and Press Upload

Step 8: Final Execution

1. After uploading the code

2. Open the Blynk app in the Phone

3. Let it connect to the internet

4. Then you would see your dashboard with a button

5. Press Play button on the top most right corner of the app

6. Then Alas!! Press the Button and you would see the LED Turn ON!!!:)

Now that you have got the basics , you can try some cool stuffs with this awesome board !!

Have fun exploring this board :)

Happy Inventing!!

Cya Next week with more interesting projects:)

<p>Thanks mate.</p><p>These are simple yet useful instructions. </p><p>I am looking forward to explore more awesome project from you.</p>
Please send this project documentation
<p>i uploaded my code ,,in serial monitor &quot;[178500] Connecting to cloud.blynk.cc:8441</p><p>[183501] Connecting to cloud.blynk.cc:8441</p><p>[188502] Connecting to cloud.blynk.cc:8441</p><p>[193503] Connecting to cloud.blynk.cc:8441</p><p>[198504] Connecting to cloud.blynk.cc:8441</p><p>[203505] Connecting to cloud.blynk.cc:8441</p><p>[208506] Connecting to cloud.blynk.cc:8441....this is only showing ..so pls tell me what i can do to connect blynk cloud.Invalid library found in C:\Users\Samar Ahmed\Documents\Arduino\libraries\Blynk: C:\Users\Samar Ahmed\Documents\Arduino\libraries\Blynk</p><p>Invalid library found in C:\Program Files (x86)\Arduino\libraries\libraries: C:\Program Files (x86)\Arduino\libraries\libraries</p><p>Invalid library found in C:\Users\Samar Ahmed\Documents\Arduino\libraries\Blynk: C:\Users\Samar Ahmed\Documents\Arduino\libraries\Blynk</p>
<p>.Invalid library found in C:\Program Files (x86)\Arduino\libraries\BlynkUpdater: C:\Program Files (x86)\Arduino\libraries\BlynkUpdater</p><p>Invalid library found in C:\Program Files (x86)\Arduino\libraries\BlynkUsbScript: C:\Program Files (x86)\Arduino\libraries\BlynkUsbScript</p><p>. [ 100% ]</p><p>starting app without reboot</p><p>espcomm_send_command: sending command header</p><p>espcomm_send_command: sending command payload</p><p>espcomm_send_command: receiving 2 bytes of data</p><p>closing bootloader</p><p>flush start</p><p>setting serial port timeouts to 1 ms</p><p>setting serial port timeouts to 1000 ms</p><p>flush complete</p><p>Invalid library found in C:\Program Files (x86)\Arduino\libraries\tools: C:\Program Files (x86)\Arduino\libraries\tools</p><p>Invalid library found in C:\Program Files (x86)\Arduino\libraries\BlynkUpdater: C:\Program Files (x86)\Arduino\libraries\BlynkUpdater</p><p>Invalid library found in C:\Program Files (x86)\Arduino\libraries\BlynkUsbScript: C:\Program Files (x86)\Arduino\libraries\BlynkUsbScript</p><p>Invalid library found in C:\Program Files (x86)\Arduino\libraries\tools: C:\Program Files (x86)\Arduino\libraries\tools</p><p>how i have to remove these errors</p>
<p>hi sir i upload successfully but my mobile blynk app is not connected with wifi module. it say &quot; Devices is offline &quot; . what can i do?. i'm using esp8266-12e and arduino id software. i'm sure blynk app config good.</p>
<p>Hey ,</p><p>Did you give correct SSID and password for the wifi. if not the device may not be able to connect.</p>
<p>i have a problem while uploading the code <br>error: espcomm_open failed</p><p>error: espcomm_upload_mem failed</p><p>error: espcomm_upload_mem failed</p>
<p>Hey,</p><p>Check the Com port . If this is not correclty set, then you may face the error!</p>
<p>Did you chose NodeMcu board in Arduino ide? When I started using NodeMcu board i have choosed only esp8266 board and faced such problem.</p>
<p>Thank you so much! Next step, control a unicorn wirelessly!</p>
<p>Is it possible even if I am not at home? I want to turn on / off AC devices using this method. What extra hardware / software will require to implement this?</p>
<p>Yes it is possible, to control even if you are not in home. You would need an relay , and should make sure that the board is connected to the internet via a wireless router.:)</p>
<p>Yes it is possible with a 5V relay. No extra software needed. instead of LED you can give the signal to vcc of the Relay Board. </p>
<p>thanx i made it </p><p>but i used the on board led on pin D0</p><p>and next thing i will do, i will connectet it to 4 channel relay</p><p>and </p>
<p>Awesome, that you built it. Hope you built something cool with the relay and this board.!!</p>
<p>Do we need to connect both Mobile WiFi in which we are using BLYNK app and ESP to the same network? If it is so, suggest me someways for doing it when connected to other networks</p>
<p>Dear Karthik,</p><p>No , It can work with different networks also. So you need not worry:)</p>
<p>Dear Karthik,</p><p>No , It can work with different networks also. So you need not worry:)</p>
<p>Great Instructable! My first IOT/arduino project. Never been so excited by making a led blink. Thank you.</p>
<p>Happy to hear that , Have fun creating more stuffs in NodeMcu:)</p>

About This Instructable

44,473views

64favorites

License:

Bio: I am an Hardcore fan of electronic stuffs and my passion is to build new projects and that is how I spent my time both ... More »
More by VIVEK GR:Home Automation Using Esp826612E,NodeMcu and Blynk App Simple Led Control With Blynk and NodeMCU Esp8266 12E Time Lapse Photography With RPI and Pi Camera 
Add instructable to: