Skip to content
IoT / CloudMIT (library) — Blynk.Cloud service itself is commercial/freemiumv1.3.2

Blynk

by Blynk Inc.

Blynk provides a hosted IoT platform and matching Arduino library so a microcontroller can push sensor data to, and receive commands from, a mobile app dashboard without building a custom server or app. `Blynk.virtualWrite()` sends a value to a labeled "virtual pin" on the dashboard, and `BLYNK_WRITE(vPin)` handler functions fire when the app sends a value back — like a toggle switch or slider. The catch that trips people up is the shift from the original free Blynk (legacy, discontinued) to Blynk IoT / Blynk.Cloud, which uses a different auth token format and app; older tutorials referencing "Blynk App" auth tokens from the legacy platform will not work with current Blynk.Cloud projects without regenerating credentials on the new platform.

Installation

Arduino IDE — Library Manager

Sketch → Include Library → Manage Libraries → search Blynk

PlatformIO

lib_deps = blynkkk/Blynk

Supported boards

Arduino UnoESP32STM32 Blue Pill

Examples

Send a sensor reading to the Blynk dashboard

Uses current Blynk.Cloud template/auth token format, not the discontinued legacy app tokens.

#define BLYNK_TEMPLATE_ID "TMPLxxxx"
#define BLYNK_TEMPLATE_NAME "MyDevice"
#define BLYNK_AUTH_TOKEN "your_auth_token"

#include <BlynkSimpleEsp32.h>

char ssid[] = "ssid";
char pass[] = "password";

void setup() {
  Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
}

void loop() {
  Blynk.run();
  Blynk.virtualWrite(V0, analogRead(A0));
}