tm1637-bright

cesars/tm1637/tm1637-bright

No description
tm1637-bright
@/tm1637-bright
1637@/tm1637-dev
Input from Dev
Brightnessnumber
Value level brightness 0-7
ONboolean
Brightness ON-OFF
SETpulse
Pulse set brightness
tm1637-bright
1637'
DONE
1637
Brightness
ON
SET
DONEpulse
Pulse done
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 {

    void evaluate(Context ctx) {

        emitValue<output_1637U0027>(ctx, getValue<input_1637>(ctx));
        if (!isInputDirty<input_SET>(ctx)){
            return;}

        auto Display = getValue<input_1637>(ctx);

        Display->setBrightness((uint8_t)getValue<input_Brightness>(ctx),(bool)getValue<input_ON>(ctx));

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