Today i show you how to control Led use Blynk App In IOT platform .First i introduce what is Blynk and Why use Blynk App.

What is Blynk App 
Blynk is a Platform with iOS and Android apps to control Arduino, Raspberry Pi and the likes over the Internet.
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 Today, I'll show you how to control an LED using the Blynk app on an IoT platform. We'll begin by introducing what Blynk is and why you should use it.

What is Blynk App?

Blynk is a platform with iOS and Android apps to control Arduino, Raspberry Pi, and similar devices over the Internet. It's a digital dashboard where you can build a graphical interface for your project by simply dragging and dropping widgets. Setting everything up is straightforward, and you'll start tinkering in less than 5 minutes. Blynk isn't tied to a specific board or shield; it supports the hardware of your choice. Whether your Arduino or Raspberry Pi is connected to the Internet over Wi-Fi, Ethernet, or the ESP8266 chip, Blynk will get you online and ready for the Internet of Your Things. For more information, click here.

Why Use Blynk App?

There are many third-party IoT platforms, but Blynk stands out for its user-friendly interface. Blynk isn't an app that works only with a particular shield; it's designed to support the boards and shields you're already using. Plus, it works on both iOS and Android.

How It Works

Blynk works over the Internet, so the only requirement is that your hardware can talk to the Internet. Regardless of the connection type—Ethernet, Wi-Fi, or the ESP8266—Blynk libraries and example sketches will get you online, connect to the Blynk Server, and pair up with your smartphone.


Architecture of Blynk system -Mechatronicslabrpi

Architecture of Blynk System

Blynk consists of three major components:

  1. Blynk App: The app allows you to create projects and interfaces to interact with your hardware.
  2. Blynk Server: Responsible for communication between your hardware and smartphone.
  3. Blynk Libraries: Enable communication with the server and process all incoming and outgoing commands.

Download the Blynk App

  1. Android Blynk App: Download from Google Play Store
  2. iOS Blynk App: Download from Apple App Store
After downloading and installing the app, you'll see an interface prompting you to sign up or log in. Click "Create New Project" to start a new Blynk app, and give it a name.
 

Setting Up Your Project

Blynk supports hundreds of hardware models and connection types. For this project, select your hardware type (NodeMCU) and connection type (WiFi). After this, Blynk will email you an Auth Token, which is essential for connecting your hardware to the Blynk app.

Adding Widgets to Your Project

  1. Open the widget box by clicking in the project window.
  2. Select a button widget to control the LED connected to your NodeMCU.
  3. Name the button "LED".
  4. Under the OUTPUT tab, select the pin to which the LED is connected (e.g., digital pin D2).
  5. Under the MODE tab, choose whether you want the button to act as a "Push Button" or "Switch".

Software Setup

First, download the Blynk library from here.

Installing the Blynk Library

  1. Unzip the Blynk_Release_vXX.zip archive.
  2. Copy the libraries and tools folders to the Arduino library and tools directories.

Uploading the Firmware

  1. Open Arduino IDE.
  2. Go to File > Examples > Blynk > Boards_WiFi > ESP8266_Standalone.
  3. Enter your Auth Token, SSID, and password in the code.
The Auth Token is vary important you can get this your mail address .

Add Widgets in your  Project
To open the widget box, click in the project window to open.
blynk app new project -mechatronicslabrpi
Now selecting a button to control Led connected with NodeMCU
  1. Click on Button.
  2. Give name to Button say led.                                    
  3. Under OUTPUT tab- Click pin and select the pin to which led is connected to NodeMCU, here it is digital pin 2, hence select digital and under pin D2. And Click continue.
  4. Under MODE tab- Select whether you want this button as "push button" or "Switch".

Now Software part
First you have no need download library  following link  

Blynk library should be installed manually. Follow the instructions:
  1. Unzip the Blynk_Release_vXX.zip archive.  you can see a library and tools folder copy the library and tools  then past to the ardunio library and tools folder 




Upload The Firmware following instruction 

 File > Examples > Blynk > Boards_WiFi> ESP8266_Standalone menu.


Now Enter your auth token
you get this tocken from your email 
After the app has uploaded, open the serial monitor, setting the baud rate to 9600. Wait for the “Ready” message
CKT  connection 
nodemcu led connection









cpp
#define BLYNK_PRINT Serial #include <ESP8266WiFi.h> #include <BlynkSimpleEsp8266.h> // 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); } void loop() { Blynk.run(); }
  1. Upload the code to your NodeMCU.

Testing Your Setup

  1. Open the serial monitor and set the baud rate to 9600.
  2. Wait for the "Ready" message.
  3. Use the Blynk app to control the LED.

Circuit Diagram (With Connection)

Connect your NodeMCU and LED as follows:

  • LED Anode (long leg): NodeMCU D2 (GPIO 4)
  • LED Cathode (short leg): NodeMCU GND

Additional Tutorials

  1. Introduction to NodeMCU8266 & Steps to Import ESP Board Libraries
  2. NodeMCU8266 Basic Project - Blink a LED
  3. NodeMCU8266 Digital Read (Push Button)
  4. Analog Data Read Using NodeMcu8266




1 comment:

Theme images by Dizzo. Powered by Blogger.