Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
78 lines (56 sloc) 2.03 KB
Download latest Blynk library here:
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials:
Sketch generator:
Blynk community:
Follow us:
Blynk library is licensed under MIT license
This example code is in public domain.
Simple push notification example
App project setup:
Push widget
Connect a button to pin 2 and GND...
Pressing this button will also push a message! ;)
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <SPI.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";
BlynkTimer timer;
void notifyUptime()
long uptime = millis() / 60000L;
// Actually send the message.
// Note:
// We allow 1 notification per 5 seconds for now.
Blynk.notify(String("Running for ") + uptime + " minutes.");
// You can also use {DEVICE_NAME} placeholder for device name,
// that will be replaced by your device name on the server side.
// Blynk.notify(String("{DEVICE_NAME} running for ") + uptime + " minutes.");
void setup()
// Debug console
// Notify immediately on startup
Blynk.notify("Device started");
// Setup a function to be called every minute
timer.setInterval(60000L, notifyUptime);
void loop()
You can’t perform that action at this time.