write(digital-portd)

koadrobot/ports/write(digital-portd)

No description
write(digital-portd)
@/write(digital-portd)
P8boolean
P9boolean
P10boolean
P11boolean
P12boolean
P13boolean
SIGboolean
State
PULLboolean
Hardware connection. pulldown (true) - High, pullup (false) - Low (1-duty).
UPDpulse
Triggers new write
write(digital-portd)
DONE
P8
P9
P10
P11
P12
P13
SIG
PULL
UPD
DONEpulse
Fires on writing complete
To use the node in your project you should have the koadrobot/ports 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);
    }
}