[LINUX] Connect your Raspberry Pi to your smartphone using Blynk

Introduction

I wanted to make an IoT device using RaspberryPi, and when I searched for a smartphone that could be operated, I found that it was easy to connect and operate using an app called Blynk, so I tried it.

What is Blynk

You can connect the Raspberry Pi to your smartphone via the Blynk server, and you will be able to operate the scripts on the Raspberry Pi using the Blynk app.

The whole picture looks like this. blynk.jpg (Source: http://docs.blynk.cc/)

What was used

--Android smartphone

Preparing to connect

Preparations are required on the smartphone side and the Raspberry Pi side respectively.

Preparation on the smartphone side

  1. Download the Blynk app
  2. Create a project with the Blynk app
  3. Make a note of the ** Token (connection key) ** for connecting to the Raspberry Pi from Blynk to the specified email address.

Preparation on the Raspberry Pi side

    1. Get Blynk's library from Github
pi@raspberrypi:~ $ git clone https://github.com/blynkkk/blynk-library.git
  1. Build and create a Blynk executable
pi@raspberrypi:~ $ cd blynk-library/linux
pi@raspberrypi:~/blynk-library/linux $ make clean all target=raspberry
    1. Start Blynk and connect to the Blynk server
pi@raspberrypi:~/blynk-library/linux $ sudo ./blynk --token="Token arrived in the email"

[0] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.1 on Linux

[1] Connecting to blynk-cloud.com:80
[583] Ready (ping: 192ms).
---

Blynk is now up and the connection between your smartphone and Raspberry Pi is complete via the server.

Summary

With Blynk, it was possible to connect a smartphone to a Raspberry Pi in a short time. After that, you can create what you want to do in the project and create an executable program to execute it via the Blynk server.

Reference site

Recommended Posts

Connect your Raspberry Pi to your smartphone using Blynk
Connect to MySQL with Python on Raspberry Pi
Output to "7-segment LED" using python on Raspberry Pi 3!
Introduced python3-OpenCV3 to Raspberry Pi
Indoor monitoring using Raspberry Pi
I talked to Raspberry Pi
Introducing PyMySQL to raspberry pi3
[Raspberry PI & Garmin GLO] Until you connect Bluetooth GPS to Raspberry Pi
I tried to automate [a certain task] using Raspberry Pi
How to get temperature from switchBot thermo-hygrometer using raspberry Pi
Connect Raspberry Pi to Alibaba Cloud IoT Platform with Python
Port FreeRTOS to Raspberry Pi 4B
USB over ethernet using Raspberry pi
Output from Raspberry Pi to Line
Try using ArUco on Raspberry Pi
Using a webcam with Raspberry Pi
Connect to MySQL using Flask SQLAlchemy
[Raspberry Pi] Changed Python default to Python3
Use your Raspberry Pi to read your student ID number from your student ID card
A memo when connecting bluetooth from a smartphone / PC to Raspberry Pi 4
Raspberry Pi --1 --First time (Connect a temperature sensor to display the temperature)
Create your own IoT platform using raspberry pi and ESP32 (Part 1)
Detect "brightness" using python on Raspberry Pi 3!
Connect to VPN with your smartphone and turn off / on the server
Make Raspberry Pi speak Japanese using OpenJtalk
Make it possible to read .eml from your smartphone using discord bot
Detect temperature using python on Raspberry Pi 3!
How to install NumPy on Raspberry Pi
Connect to the console of Raspberry PI and display local IP and SD information
#Monte Carlo method to find pi using Python
Detect slide switches using python on Raspberry Pi 3!
Try using a QR code on a Raspberry Pi
How to use Raspberry Pi pie camera Python
Detect magnet switches using python on Raspberry Pi 3!
Power on / off your PC with raspberry pi
Sound the buzzer using python on Raspberry Pi 3!
Create a visitor notification system using Raspberry Pi
Play with your Ubuntu desktop on your Raspberry Pi 4
Connect to the Bitcoin network using pybitcoin tools
Control music playback on a smartphone connected to Raspberry Pi 3 and bluetooth with AVRCP
Raspberry Pi backup
Connect to mysql
Create your own IoT platform using raspberry pi and ESP32 (Part 2) ~ ESP32 setting L Chika
From setting up Raspberry Pi to installing Python environment
Build an OpenCV4 environment on Raspberry Pi using Poetry
Create a color sensor using a Raspberry Pi and a camera
Using the digital illuminance sensor TSL2561 with Raspberry Pi
Using Akizuki Denshi's 4WD car FT-MC-004 with Raspberry Pi
Monitor temperature using Raspberry Pi + Alibaba cloud IoT platform
Try to visualize the room with Raspberry Pi, part 1
How to use the Raspberry Pi relay module Python
Try using the temperature sensor (LM75B) on the Raspberry Pi.
Post to your account using the API on Twitter
I wanted to run the motor with Raspberry Pi, so I tried using Waveshare's Motor Driver Board
Play to notify Slack of environmental data using AWS PaaS from SensorTag via Raspberry Pi3