Toggle widget
What it does
Sliding on/off switch for binary state. Same payload contract as Button in switch mode but with a toggle affordance.
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 |
|---|---|---|---|
onValue | text | 1 | Payload sent when flipped on. |
offValue | text | 0 | Payload sent when flipped off. |
onLabel | text | ON | Label shown on the on side. |
offLabel | text | OFF | Label shown on the off side. |
color | color | — | Accent for the active state. |
showPin | boolean | true | Renders the V-pin badge on the tile. |
Typical use
firmware.ino
BLYNK_WRITE(V2) { bool on = param.asInt() != 0; digitalWrite(LED_PIN, on);}iOS app
Yes — matches iOS toggle affordance and scalar payload.