Firmware Library
Arduino/C++ reference for the device-side library connected to a Plynx server.
Virtual Pins
Virtual pins are the main bridge between widgets and firmware. They do not map directly to physical GPIO and can carry numbers, strings, RGB triplets, table rows, and more.
vpin_read.ino
// Read value from app widget on V0BLYNK_WRITE(V0) { int value = param.asInt(); Serial.println(value);}Timers
Avoid delay(). Use a cooperative timer so Blynk.run() keeps the connection responsive.
timer_example.ino
1234567891011BlynkTimer timer;void setup() { Blynk.begin(PLYNX_AUTH_TOKEN, ssid, pass, "plynx.cc", 8080); timer.setInterval(1000L, sendSensor);}void loop() { Blynk.run(); timer.run();}Server targets
Use the public host or the same exact firmware against a private edge instance.
server_config.ino
// Public hostBlynk.begin(PLYNX_AUTH_TOKEN, ssid, pass, "plynx.cc", 8080);RGB merge mode
zeRGBa can drive a 3-channel LED strip in a single widget.
rgb_led.ino
123456789101112#define RED_PIN D5#define GREEN_PIN D6#define BLUE_PIN D7BLYNK_WRITE(V2) { int r = param[0].asInt(); int g = param[1].asInt(); int b = param[2].asInt(); analogWrite(RED_PIN, r); analogWrite(GREEN_PIN, g); analogWrite(BLUE_PIN, b);}Protocol note
The wire protocol stays compatible with the existing device-side transport: 1 byte command, 2 bytes message id, 2 bytes body length, then 0x00-separated fields. For raw packets go to Protocol Spec.