What is Blynk?
Are you planning to start a IoT based project? Do you want your project to be controlled seamlessly from internet? If yes, then you are going through right article. Blynk is one of the best platform to fulfill your IoT needs.
Yes, you read it correct! Its blynk with a Y.
Image source Blynk
A platform which supports 400+ development boards, SBC’s (Single Board Computers) and other modules. This platform provides you a feasibility to connect your projects with internet and access them from any part of the world. This is one of my favorite.
Today, almost everyone has a smartphone. And what if you get to control your home appliances using your smartphone? Sounds cool right!
This app is works as a control panel for your IoT smart devices along with monitoring the data. You need energy to add widgets of your choice in your projects. When you signup, you will receive 2000 Energy on your Blynk account for free. Exceeding this you have to purchase energy to deploy more widgets.
This is a kind of digital dashboard where you can see the status and the parameter graphically. It allows you to drag and drop the widgets you need for you projects and configure them. It is really simple to configure and interface with your project.
This platform supports almost all boards and shields available in the market. Starting from Arduino to Raspberry Pi, connecting them over Wi-Fi or Ethernet. This can be interfaced with ESP8266 and within couple of minutes you will be online with your device.
Every project you create requires a authentication code. This code helps your hardware to connect with blynk server and further sends information to your mobile app. This is a cloud based server which provides a secure, responsive and centralized cloud service.
The server can be configured by your own on your computer which can make your network more isolated. You can use Raspberry Pi and many other single board computers available in the market.
The most important feature of this Iot platform, which make it great is scalable. The library makes it possible to easily interface your device/hardware and get it up and running in seconds 🙂
This helps interfacing of multiple hardware like Raspberry Pi, Arduino Boards, ESP8266 wifi modules, Nodemcu’s etc. It also provides different ways of communication like Bluetooth, USB, GSM and Wi-Fi to connect your hardware devices.
Installing and Configuring Blynk
Download and install the blynk app
How to get AUTH Token
To connect Blynk App with your hardware, you need an Auth(authorization) Token. This will be unique for every project you build using blynk
- Create a new account in Blynk App.
- Create a New Project.
Select the hardware or board you want to use in your project
Select the connection type
Once the project is created on app, a Auth Token will be sent over your registered email address.
Installing and configuring Blynk Library in Arduino IDE
For loading the code form Arduino IDE to your hardware for using blynk projects you have to install blynk library manually.
Follow the below instructions for installation and configuration:
- Download the latest library release .zip file from here.
- Once you unzip it. You will notice that archive contains several folders and several libraries.
- Copy all these files and folders to your_sketchbook_folder of Arduino IDE. To find the location of your_sketchbook_folder
- Go to top menu in Arduino IDE: File -> Preferences (if you are using Mac OS – go to Arduino → Preferences)
Your first example sketch
Blynk works with hundreds of hardware models and connection types. We prepared Blynk Examples Sketch Builder that allows you to create example code for your hardware.
- Choose the board (for example: Arduino UNO)
- Choose your connection (WiFi, Ethernet, Bluetooth, USB…)
Update the Authentication token
If you observe the sketch carefully, you will find a line of code below. Replace YourAuthToken with you alphanumeric authentication ticket which you will get over email.
char auth = “YourAuthToken”;
It should look something like this
char auth = "53e4da879376xxxxxxxxxxxxxxxxxxxx";
Upload your code
Once you open serial monitor in Arduino IDE. You should see something like this
Must Read: Uploading Blynk code in ESP8266
___ __ __ / _ )/ /_ _____ / /__ / _ / / // / _ / '_/ /____/_/_, /_//_/_/_ /___/ v0.4.4  Connecting to YourWiFi  Connected to YourWiFi  My IP: 192.168.0.17  Blynk v0.4.4  Connecting to blynk-cloud.com:80  Ready (ping: 1ms) This shows that your device is connected with internet and ready to be accessed over internet.