tm1637-v2-set

cesars/tm1637-v2/tm1637-v2-set

Setting brightness and type
tm1637-v2-set
@/tm1637-v2-set
Setting brightness and type
1637-2@/tm1637-v2-dev
Input from Dev
Typenumber
Select display type 0 o type 1
BRT'number
Value level brightness 0-7
SETpulse
Pulse set brightness
tm1637-v2-set
1637-2
Type
BRT'
SET
1637-2'
DONE
DONEpulse
Pulse done
1637-2'@/tm1637-v2-dev
Output dev
To use the node in your project you should have the cesars/tm1637-v2 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

#pragma XOD evaluate_on_pin enable input_SET

node {
    int8_t init = 0;

    void evaluate(Context ctx) {

        emitValue<output_1637_2U0027>(ctx, getValue<input_1637_2>(ctx));
        if (!isInputDirty<input_SET>(ctx))return;

        auto Display = getValue<input_1637_2>(ctx);

        if(init < 1){
            Display->init(getValue<input_Type>(ctx));
            init = 1;
        }
        Display->set(getValue<input_BRTU0027>(ctx));
        emitValue<output_DONE>(ctx, 1);
    }
}