To use the node in your project you should have the greenberg-nicholas/esp32-relay 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);
}
}