write

gabbapeople/blynk/write

Writes data to a blynk widget
write
@/write
Writes data to a blynk widget
BLNK@/blynk
VPINnumber
Virtual pin number of a widget
DATAstring
Data to wrtite to a widget
PUSHpulse
Triggers a new write
write
BLNK
VPIN
DATA
PUSH
To use the node in your project you should have the gabbapeople/blynk library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

struct State {
    char data[24];
};

{{ GENERATED_CODE }}




void evaluate(Context ctx) {
    auto state = getState(ctx);
    auto blynk = getValue<input_BLNK>(ctx);

    uint8_t vpin = getValue<input_VPIN>(ctx);
    dump(getValue<input_DATA>(ctx),state->data);

    if (isInputDirty<input_PUSH>(ctx)){
        blynk.xodBlynk->virtualWrite(vpin,state->data);
    }
}