Blynk app Setup up Tutorial | Blynk app with Nodemcu ESP8266

Blynk app Setup up Tutorial | Blynk app with Nodemcu ESP8266

Hello guys, welcome back to another tutorial from the SriTu Hobby blog. This tutorial covers how to set up a Blynk app. Also, this project includes how to control an LED over the Internet using a Blynk application. Using this Blynk app and Nodemcu we can do various projects. We will learn about them in future tutorials. So, make this tutorial the basis for those projects. Click this link for more information about Nodemcu.

What is the Blynk app?

The Blynk app is simply an open-source platform designed for iOS / Android devices to remotely control and view hardware. It is also designed for the Internet of Things (IoT). The dashboard can be customized in a very useful way by using various Widgets such as Buttons, Displays, and Sliders included in this Blynk app. Also, this widget allows you to devices on / off and view sensor values. Lastly, you can view, store, and visualize data through this.

So, this Blynk app is made up of 3 main parts. They are as follows.

  1. Blynk app — Here we can customize the interface to suit our design. The Blynk app includes various widgets for this purpose.
  2. Blynk server — The Blynk server is used to communicate project hardware with the Blynk application installed on the smartphone. You can use Blynk Cloud for that. This is Blynk cloud open-source and can control thousands of devices through it.
  3. Blynk library — The Blynk library is used to communicate with the hardware platform Blynk server used with the Blynk app and to process incoming and outgoing commands.

Click this link to learn more about the Blink app. You can download this Blynk app using the Play Store or App Store.

Below are the different types of development boards that can be controlled by the Blynk app.

  • ESP8266 / ESP32 boards
Blynk app Setup up Tutorial | Blynk app with Nodemcu ESP8266
  • Arduino boards
Blynk app Setup up Tutorial | Blynk app with Nodemcu ESP8266
  • Raspberry Pi boards
Blynk app Setup up Tutorial | Blynk app with Nodemcu ESP8266

Today we will learn how to turn ON and OFF the LED bulb over the Internet using the Nodemcu board. Also, this is a simple example of how to use the Blynk app, so understanding this will help you create many more for future tutorials. The required components are as follows.

Disclosure: These Amazon links are Affiliate links. As an Amazon Associate, I earn from qualifying purchases.

So, Let’s do this project step by step.

Step 1

Firstly, identify these components.

Step 2

Secondly, connect these components using the circuit diagram below.

Blynk app Setup up Tutorial | Blynk app with Nodemcu ESP8266

Step 3

So, now set up the Blynk application. For that, follow the steps below.

  • Firstly, download and install this Blynk app on your Smartphone. For that, use the Play Store or App Store.
  • Secondly, we need to create a new account, then click on the “Create New Account” button and enter the Gmail address and password of your choice. Afterward, click the “Sign Up” button. Then a mail will go to the email you entered. There is a code called “Auth Token” in that mail and that code is what we need for our future work.
  • Thirdly, click the “New Project” button and enter your project name here. Then select Nodemcu instead of “CHOOSE DEVICE”. Because we are using a Nodemcu here. Afterward, select the wifi in the “Connection Type” field. Lastly, click the “Confirm” button. Ok, now let’s look at the project interface.
  • Now, you can add widgets to your LED ON and OFF project. For that, click the “+” sign in the upper right corner and add a “Button” widget.
  • Afterward, we have to make this button as we want. First, give it a name you like. I have put it as LED. Then click on PIN select Digital and select D0. Next, pull the button under the mode to the switch side. If you want to change the color you can change it. When you have done all this, click the Back button.
  • Lastly, your project interface can be customized.
Blynk app Setup up Tutorial | Blynk app with Nodemcu ESP8266

Step 4

So, now let’s create a program. For that, we first need two libraries. That is the library required for WIFI and the library required for the Blynk application. Download these two from the link below and add them to the Arduino IDE.

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
 
char auth[] = "auth token";//Enter your Auth token
char ssid[] = "SSID";//Enter your WIFI name
char pass[] = "Password";//Enter your WIFI password
 
void setup() {
  pinMode(D0, OUTPUT);
  Blynk.begin(auth, ssid, pass);
}
void loop() {
  Blynk.run();
}

Code Explanation

It is a simple code. Firstly, WIFI and Blynk libraries are included in this code.

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

Secondly, we need to change the information below.

char auth[] = “auth token”;//Enter your Auth token
char ssid[] = “SSID”;//Enter your WIFI name
char pass[] = “Password”;//Enter your WIFI password
  1. char auth [] = “auth token”; Replace the “auth token” in the section with the Author Token you received from Blynk. For that, check your Blynk app sign-up Gmail.
  2. char ssid [] = “SSID”; In the section “SSID“; Enter the name of your Wi-Fi network instead.
  3. char pass [] = “Password”; Enter the password for your Wi-Fi network instead of the “Password” in the section.

In the void setup, the Blynk library begins and the LED pin is converted to an OUTPUT pin.

void setup() {
  pinMode(D0, OUTPUT);
  Blynk.begin(auth, ssid, pass);
}

Lastly, the Blynk library is run in the void loop.

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

Step 5

Now we are all done. So, now all you have to do is connect your NodeMCU Board to your Laptop or Desktop computer, select NodeMCU 1.0 for the Arduino IDE Board, select the relevant port, and upload the code. Once the code is uploaded, all you have to do is run the project we created in the Blynk app. You can do that by clicking on the triangle on the right side of the Blynk app.

Now you can On and off the LED bulb using the Button. Also, remember to activate your internet connection at this time. The full video guide is below. In this tutorial, we have created a simple project using Nodemcu. If you understand this well, it will be very useful for the projects of our future articles. So, we’ll see in the next Tutorial.

Blynk app Setup up Tutorial | Blynk app with Nodemcu ESP8266

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart
Select your currency
USD United States (US) dollar
EUR Euro
Scroll to Top