tm1637-digits

cesars/tm1637/tm1637-digits

No description
tm1637-digits
@/tm1637-digits
1637@/tm1637-dev
DIG0byte
DIG1byte
DIG2byte
DIG3byte
UPDpulse
tm1637-digits
1637
DIG0
DIG1
DIG2
DIG3
UPD
1637'
DONE
DONEpulse
1637'@/tm1637-dev
To use the node in your project you should have the cesars/tm1637 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

node {

    uint8_t data[4] = { 0xff, 0xff, 0xff, 0xff };
    uint8_t blank[4] = { 0x00, 0x00, 0x00, 0x00 };

    void evaluate(Context ctx) {

        emitValue<output_1637U0027>(ctx, getValue<input_1637>(ctx));
        if (!isInputDirty<input_UPD>(ctx)) return;

        auto Display = getValue<input_1637>(ctx);

        data[0] = getValue<input_DIG0>(ctx);
        data[1] = getValue<input_DIG1>(ctx);
        data[2] = getValue<input_DIG2>(ctx);
        data[3] = getValue<input_DIG3>(ctx);

        Display->setSegments(data);

        emitValue<output_DONE>(ctx, 1);
    }
}