.st0{fill:#FFFFFF;}

Blynk

Arduino mobile development with Blynk, a dual device demo 

 September 19, 2020

By  Peter

Join Our Mailing List

We publish fresh content each week. Read how-to's on Arduino, ESP32, KiCad, Node-RED, drones and more. Listen to interviews. Learn about new tech with our comprehensive reviews. Get discount offers for our courses and books. Interact with our community.

One email per week, no spam, unsubscribe at any time.

Demonstration video:

After spending a bit of time playing with Blynk, I have created a demonstration of some of the things you can do with it. In this demo, I use an Arduino Nano 33 IoT and ESP32, and run a private Blynk server on a Raspberry Pi Zero W.

What is Blynk?

In case you are not familiar with Blynk, here’s a quick introduction:

Blynk is a platform for rapid development of smartphone applications that work with devices such as the Arduino, the Raspberry Pi, the ESP32/ESP8266, and many others.

Here’s a full list.

The real list of compatible hardware is much longer.

For example, the Arduino Nano 33 IoT is not included in the list. Still, because this specific Arduino model is WIFI-compatible with the Arduino MKR 1010 (which is in the list), it is also possible to use with Blynk.

The Arduino Nano 33 IoT is one of the devices that I am using in this demo (the other is a generic ESP32).

Blynk implements a server-centric model: A Blynk server provides connectivity and communications between any connected devices, such as Arduinos, ESP32 and smartphones.

An example Blynk app

Here’s an example of an app I put together in a few minutes:

An Arduino Nano 33 IoT that sends its accelerometer data to my phone:

The Arduino Nano 33 IoT has a built-in accelerometer and Wifi, so it is perfect for small experiments like this (and much more, of course).

In this experiment, I wrote a simple sketch that connects the Arduino to the public Blynk server and sends over data from its accelerate. On my phone, my custom Blynk app shows that data graphically.

I also added a couple of buttons to control the Arduino build-in LED, plus an external LED.

Blynk provides a comprehensive library for the Arduino IDE and a set of widgets for the mobile phone app so that you can prototype rapidly. I am impressed by how much you can do once you understand just the basics.

But what Blynk can deliver is much more than trivial applications for blinking LEDs (or as the Blynk developers would say “blynking LEDs”). You can use Blynk to develop professional smartphone applications (for iOS and Android) and deliver them to market at a massive scale.

An example multi-device app

Blynk apps can work with more than one devices. You can also implement a private Blynk server so that you have total control and ownership of the application data, with no restrictions that I am aware of.

So, I wanted to try this out. I build a Blynk application that interacts with two devices (an Arduino Nano 33 IoT and an ESP32), supported by a private Blynk server running on a Raspberry Pi Zero W.

You can see this application in action in this video (or continue to read).

The Raspberry Pi Zero is having no trouble at all running the Blynk server, despite having a single-core processor and just 512MB of RAM.

As you can see below, it is consuming a fraction of the available CPU cycles and memory (I did some basic optimization for the RAM).

The Blynk server is light on resources. Here, running on a Raspberry Pi Zero W.

I can control the connected devices via the widgets on the Blynk app. I can turn LED on/off using buttons, or their brightness using sliders. I can also get text output from the devices displayed in the terminal widget. I can organise those widgets in any way I like, and connect them to any device.

Use any of the wide range of Blynk widgets to interact with your devices.

A very interesting widget is the plotter. I “connected” the accelerometer X-Y-Z output from the Arduino Nano 33 IoT to the plotter widget. This shows the values in real-time, in a beautiful graph, that can also go full screen. Of course, you can export the data in CSV format for processing. Just imagine how difficult it would be to implement something like this outside of the Blynk platform.

You can also use the Blynk server to send emails from the devices. In my example, I connected a button widget to a function on the ESP32 so that when I press the button, the ESP32 will send me an email with the millis value.

Blynk supports email, Twitter and iOS/Android push notifications.

There are other communications options, such as Twitter or push notifications to your smartphone.

Very cool!

With this demo, I wanted to show you what I’ve done in the time I’ve been playing with Blynk.

If you have any ideas of experiments that you’d like me to conduct, please ask via the comments box below.

I’m also keen to know about any Blynk applications you have made.


Tags

Arduino, Blynk, ESP32, mobile development


You may also like

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Understanding the power requirements is crucial for any enthusiast using the Arduino Uno in their projects. How you manage voltage, amperage, and power sources impacts the success or failure of your endeavours. In this guide,

Read More
The Ultimate Guide to Powering Your Arduino Uno Board

If you are curious about how electronic devices work, understanding the fundamentals of the operation of their basic components is essential. Every electronic device—from the smartphones in our pockets to the satellites orbiting our planet—contains

Read More
A Guide to Essential Electronic Components in Circuits