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 this book covers

Chapter 1, Setting Up a Development Environment, explains how to set up the development environment for Blynk with Raspberry Pi. It describes how to install Blynk libraries and some supporting software components that you can use to build Raspberry Pi-based IoT hardware. Then, you will build a control application with Blynk app builder. After that, you need to write a C++ application to connect with the Blynk cloud. Finally, you run the Blynk app to connect the Raspberry Pi to Blynk app builder through the Blynk cloud over a Wi-Fi network.

Chapter 2, Building Your First Blynk Application, explains how to build your first Blynk application to control an LED (or any actuator) attached to the Raspberry Pi from your smartphone or tablet. First, you will build an app with the Blynk app builder. Then, you will use digital or virtual pins to control the attached LED. After that, you will learn how to write a simple C++ application with nano text editor. Finally, you will build the application and run it to connect the Blynk app and the Raspberry Pi hardware.

Chapter 3, Using Controller Widgets, covers how to use controller widgets such as Slider, Step, Joystick, and zeRGBa, to control actuators. You will also learn how to use WiringPi’s software PWM library, connect controller widgets with digital and virtual pins, use the split and merge mode, and parsing values coming from the controller widgets.

Chapter 4, Using Display Widgets, guides you on how to use display widgets, such as the Value Display widget, and Labeled Value widget to show sensor data, and the LED widget to show a button state.

Chapter 5, Using Notification Widgets, explains how to send notifications to the Blynk app from Raspberry Pi. You will schedule your Raspberry Pi to send notifications to your smartphone on user action. Some of the notification widgets can be integrated with third-party services, such as Twitter to send tweets from Raspberry Pi. Then, you will use the notification widget to send pop-up notifications to the smartphone or tablet. Finally, you will also learn how to send emails from Raspberry Pi using the Email widget.

Chapter 6, Connecting with Sensors on Your Mobile Device, guides you on how to read data from built-in sensors such as the accelerometer, light sensor, and proximity sensor on your smartphone or tablet.

Chapter 7, Setting Up a Personal Blynk Server, guides you on how to set up a personal Blynk server on Raspberry Pi. The Blynk personal server replaces the Blynk cloud. You can connect all your Blynk hardware to this personal server through your local network.

Chapter 8, Controlling a Robot with Blynk, explains how to build a robot vehicle using a two-wheeled robot chassis kit. Then, you will build an application with the Blynk app builder to control it through the Blynk cloud by connecting to a Wi-Fi network.