hc595-ctrl

bradzilla84/74hc595/hc595-ctrl

No description
hc595-ctrl
@/hc595-ctrl
RSTport
CLEAR (Pin 10 on the chip)
ENport
ENABLE (Pin 13 on the chip)
RSTinboolean
Enable the CLEAR Pin
ENinboolean
Enable the ENABLE Pin
INITpulse
Pulse to Update
hc595-ctrl
RST
EN
RSTin
ENin
INIT
OK
OKpulse
To use the node in your project you should have the bradzilla84/74hc595 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_INIT>(ctx))
        return;

    const uint8_t portRST = getValue<input_RST>(ctx);
    const uint8_t portEN = getValue<input_EN>(ctx);

    ::pinMode(portRST, OUTPUT);
    const bool rst = getValue<input_RSTin>(ctx);
    ::digitalWrite(portRST, !rst);
    ::pinMode(portEN, OUTPUT);
    const bool en = getValue<input_ENin>(ctx);
    ::digitalWrite(portEN, !en);
    emitValue<output_OK>(ctx, 1);
}