To use the node in your project you should have the koadrobot/arduino 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 {
};
{{ GENERATED_CODE }}
void evaluate(Context ctx)
{
if (isInputDirty<input_UPD>(ctx))
{
bool val = getValue<input_SIG>(ctx);
if (!getValue<input_PULL>(ctx)) val = !val;
if (getValue<input_P8>(ctx)) { ::pinMode(8, OUTPUT); ::digitalWrite(8, val); }
if (getValue<input_P9>(ctx)) { ::pinMode(9, OUTPUT); ::digitalWrite(9, val); }
if (getValue<input_P10>(ctx)) { ::pinMode(10, OUTPUT); ::digitalWrite(10, val); }
if (getValue<input_P11>(ctx)) { ::pinMode(11, OUTPUT); ::digitalWrite(11, val); }
if (getValue<input_P12>(ctx)) { ::pinMode(12, OUTPUT); ::digitalWrite(12, val); }
if (getValue<input_P13>(ctx)) { ::pinMode(13, OUTPUT); ::digitalWrite(13, val); }
emitValue<output_DONE>(ctx, 1);
}
}