Button widget
What it does
Momentary or toggle actuator that writes a single scalar to a virtual pin. The canvas renders live state; the board reacts through a BLYNK_WRITE handler.
Pins
- Semantics: Single virtual pin (V1..V127)
- Writes to one virtual pin, V1..V127.
- Default size: 2 x 1
Config fields
| Field | Type | Default | Effect |
|---|---|---|---|
label | text | — | Caption shown on the button face. |
mode | select (switch / push) | switch | Toggle vs hold-to-press semantics. |
onValue | text | 1 | Payload sent on press / turn-on. |
offValue | text | 0 | Payload sent on release / turn-off. |
onLabel | text | ON | Optional caption when latched on. |
offLabel | text | OFF | Optional caption when latched off. |
color | color | — | Accent for the active surface. |
offColor | color | — | Accent for the off state. |
showPin | boolean | true | Renders the V-pin badge on the tile. |
Typical use
firmware.ino
BLYNK_WRITE(V1) { int v = param.asInt(); digitalWrite(RELAY_PIN, v);}iOS app
Yes — iOS Plynx renders buttons with identical switch/push semantics (Plynx/Views/Project/Dashboard/Widgets/ButtonView.swift).