hc595(trig)

samele1222/ship-data/hc595(trig)

No description
hc595(trig)
@/hc595(trig)
ENboolean
TRIGport
hc595(trig)
OUT
EN
TRIG
OUTboolean
To use the node in your project you should have the samele1222/ship-data 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(!getValue<input_EN>(ctx))
        return;

    auto Trig = getValue<input_TRIG>(ctx);

    uint8_t i;
    uint32_t t1,tim;
    uint32_t timer = 100000;

    ::pinMode(Trig, OUTPUT);

    ::digitalWrite(Trig, 0);
    for(tim=timer;tim>0;tim--)t1 = tim;
    ::digitalWrite(Trig, 1);
    for(tim=timer;tim>0;tim--)t1 = tim;
    ::digitalWrite(Trig, 0);
    for(tim=timer;tim>0;tim--)t1 = tim;

    emitValue<output_OUT>(ctx, true);
}