O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hands-On Internet of Things with Blynk

Book Description

Connect things to create amazing IoT applications in minutes

About This Book
  • Use Blynk cloud and Blynk server to connect devices
  • Build IoT applications on Android and iOS platforms
  • A practical guide that will show how to connect devices using Blynk and Raspberry Pi 3
Who This Book Is For

This book is targeted at any stakeholder working in the IoT sector who wants to understand how Blynk works and build exciting IoT projects. Prior understanding of Raspberry Pi, C/C++, and electronics is a must.

What You Will Learn
  • Build devices using Raspberry Pi and various sensors and actuators
  • Use Blynk cloud to connect and control devices through the Blynk app
  • Connect devices to Blynk cloud and server through Ethernet and Wi-Fi
  • Make applications using Blynk apps (App Builder) on Android and iOS platforms
  • Run Blynk personal server on the Windows, MAC, and Raspberry Pi platforms
In Detail

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.

Style and approach

A step-by-step guide that will help you build simple yet exciting project in no time.

Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Hands-On Internet of Things with Blynk
  3. Packt Upsell
    1. Why subscribe?
    2. PacktPub.com
  4. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  6. Setting Up a Development Environment
    1. What is Blynk?
      1. Hardware platforms
      2. Connection types
      3. Blynk architecture
      4. Blynk ecosystem
      5. Online resources
    2. The Blynk app builder
      1. Installing the Blynk app builder
      2. Creating a Blynk account
      3. Creating a new project
    3. Getting parts
      1. Raspberry Pi
      2. Setting up Raspberry Pi
    4. Setting up software on Raspberry Pi
      1. Installing Raspbian
      2. Writing Raspbian Stretch Lite image on SD card
      3. Creating a configuration file for SSH
      4. Connecting with Raspberry Pi with SSH
      5. Configuring a wireless connection on Raspberry Pi
    5. Installing prerequisite software on Raspbian
      1. Updating and upgrading Raspbian
      2. Installing git
      3. Installing WiringPi
      4. Deploying Blynk libraries
    6. Connecting Raspberry Pi with Blynk Cloud
    7. Summary
  7. Building Your First Blynk Application
    1. Controlling an LED
      1. Things you need
      2. Building the circuit
    2. Building the Blynk app
    3. Adding a Button widget
    4. Running the project
    5. Playing the app
    6. Using virtual pins
    7. Configuring Button widget with virtual pin
    8. Modifying the main.cpp file
    9. Running the project
    10. Summary
  8. Using Controller Widgets
    1. Creating a project
    2. Slider
      1. Adding a Slider widget
      2. Using digital pins
      3. Using virtual pins
    3. Step
      1. Adding a Step widget
      2. Using digital pins
      3. Using virtual pins
    4. zeRGBa
      1. Using digital pins
      2. Using virtual pins
      3. Controlling an RGB LED
        1. Building the circuit
        2. Running the project
    5. Joystick
      1. Using digital pins
      2. Using virtual pins
    6. Summary
  9. Using Display Widgets
    1. Value Display
      1. Using digital pins
      2. Using virtual pins
    2. Labeled Value
      1. Configuring a Labeled Value widget
    3. LED
      1. Using virtual pins
    4. Summary
  10. Using Notification Widgets
    1. Twitter
      1. Adding a Twitter widget
      2. Configuring
      3. Sending tweets
      4. Twitter button
    2. Notification widget
      1. Configuring the Notification widget
      2. Writing a notification
    3. Email
      1. Configuring the Email widget
      2. Writing code to send email
    4. Summary
  11. Connecting with Sensors on Your Mobile Device
    1. Accelerometer
      1. Accelerometer widget
      2. Configuring the Accelerometer widget
      3. Reading accelerometer data
      4. Calculating overall acceleration
    2. Light sensor
      1. Adding the Light Sensor widget
      2. Configuring the Light Sensor widget
      3. Reading light sensor
    3. Proximity sensor
      1. Configuring the Proximity Sensor widget
      2. Writing code
    4. Summary
  12. Setting Up a Personal Blynk Server
    1. Setting up a Blynk server on Raspberry Pi
      1. Enabling autostart with rc.local
      2. Enabling autostart with crontab
      3. Verifying that the Blynk server is running
    2. Connecting the Blynk app builder with the server
      1. Creating a new project to get the auth token
    3. Using the administration interface
      1. Writing a simple code to build the connection
    4. Summary
  13. Controlling a Robot with Blynk
    1. Choosing a chassis kit
      1. Adafruit
      2. SparkFun
      3. Pololu
    2. Creating a Blynk app
    3. Motor driver
    4. Summary
  14. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think