Book Image

Hands-On Internet of Things with Blynk

By : Pradeeka Seneviratne
Book Image

Hands-On Internet of Things with Blynk

By: Pradeeka Seneviratne

Overview of this book

Blynk, known as the most user-friendly IoT platform, provides a way to build mobile applications in minutes. With the Blynk drag-n-drop mobile app builder, anyone can build amazing IoT applications with minimal resources and effort, on hardware ranging from prototyping platforms such as Arduino and Raspberry Pi 3 to industrial-grade ESP8266, Intel, Sierra Wireless, Particle, Texas Instruments, and a few others. This book uses Raspberry Pi as the main hardware platform and C/C++ to write sketches to build projects. The first part of this book shows how to set up a development environment with various hardware combinations and required software. Then you will build your first IoT application with Blynk using various hardware combinations and connectivity types such as Ethernet and Wi-Fi. Then you'll use and configure various widgets (control, display, notification, interface, time input, and some advanced widgets) with Blynk App Builder to build applications. Towards the end, you will learn how to connect with and use built-in sensors on Android and iOS mobile devices. Finally you will learn how to build a robot that can be controlled with a Blynk app through the Blynk cloud and personal server. By the end of this book, you will have hands-on experience building IoT applications using Blynk.
Table of Contents (10 chapters)

What is Blynk?

Blynk was born as a Kickstarter project created by Pasha Baiborodin, and backed by 2,321 supporters who pledged $49,235 to help bring it to life. This is more than the finally announced stretched goal that is $26,000. Blynk is one of the successfully completed projects listed on Kickstarter (https://www.kickstarter.com/):

Kickstarter campaign page for Blynk

Hardware platforms

Blynk supports hardware platforms such as Arduino, Raspberry Pi, and similar microcontroller boards to build hardware for your projects. The following is a list of some microcontroller boards that can be coupled with Blynk:

  • Espressif (ESP8266, ESP32, NodeMCU, WeMos D1, Adafruit HUZZAH, SparkFun Blynk Board, SparkFun ESP8266 Thing)
  • Linux (C++) (Raspberry Pi, Ubuntu)
  • Arduino (Arduino UNO, Arduino MKR1000, Arduino MKRZero, Arduino Yun, Arduino 101, Arduino Zero, Arduino M0, Arduino M0 Pro, Arduino Nano, Arduino Leonardo, Arduino Due, Arduino Mega 2560, Arduino Mega 1280, Arduino Mega ADK, Arduino Micro, Arduino Pro Micro, Arduino Mini, Arduino Pro Mini, Arduino Fio, Arduino Decimilia, Arduino Duemilanove, Arduino Pro, Arduino Ethernet, Arduino Leonardo ETH, Arduino Industrial 101)
  • Particle (particle core, particle photon, particle electron)

You can read the list of up-to-date hardware that you can use with Blynk at https://github.com/blynkkk/blynkkk.github.io/blob/master/SupportedHardware.md.

Connection types

Blynk supports the following connection types to connect your microcontroller board (hardware) with the Blynk Cloud and Blynk's personal server:

  • Ethernet
  • Wi-Fi
  • Bluetooth
  • Cellular
  • Serial

However, throughout this book, you will only focus on Wi-Fi and Ethernet connection types to connect with Blynk Cloud and Blynk's personal server.

Blynk architecture

The Blynk platform includes the following components:

  • Blynk app builder: Allows to you build apps for your projects using various widgets. It is available for Android and iOS platforms.
  • Blynk server: Responsible for all the communications between your mobile device that's running the Blynk app and the hardware. You can use the 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: Enables communication with the server and processes all the incoming and outcoming commands from your Blynk app and the hardware. They are available for all the popular hardware platforms.

All the aforementioned components communicate with each other to build a fully functional IoT application that can be controlled from anywhere through a preconfigured connectivity type. You can control your hardware from the Blynk app running on your mobile device through the Blynk Cloud or Blynk's personal server. It works the same in the opposite direction by sending rows of processed data from hardware to your Blynk app.

Blynk ecosystem

The Blynk ecosystem consists of the following partners. They can cover anything from electronic components, to manufacturing and data plans:

  • Intel IoT Solutions Alliance
  • SparkFun Electronics
  • Espressif
  • Arduino
  • Texas Instruments
  • Proximus
  • Deutshe Telekom
  • Particle
  • Samsung
  • littleBits
  • Hologram
  • ThingSpeak.com
  • Electric Imp
  • Punch Through
  • Codebender
  • RedBearLab
  • Wicked device
  • TinyCircuits

Online resources

Blynk provides the following online resources through their website:

  • Getting started: Guides you how to connect your Arduino with Blynk Cloud by writing sketch with Arduino's Integrated Development Environment (IDE) (http://www.blynk.cc/getting-started).
  • Documentation: Provides a comprehensive documentation about how to work with the Blynk app builder, Blynk libraries, Blynk Cloud, and Blynk's personal server. This guide mainly focuses on the Arduino development environment (http://docs.blynk.cc/).
  • Forum: There are thousands of people around the globe who are willing to help your Blynk projects through this conversation board. You can register with the Blynk forum by creating a new account with it, posting your questions, discussing with experts, helping others, and sharing your work with others (http://community.blynk.cc/).