tm1637-v2-dev

cesars/tm1637-v2/tm1637-v2-dev

No description
tm1637-v2-dev
@/tm1637-v2-dev
pinCLKport
Pin Clock D10 on board Pin Clock D7 for external
pinDIOport
Pin DIO D11 on board PinDIO D8 for external
tm1637-v2-dev
pinCLK
pinDIO
1637-2'
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 require "https://github.com/Cesar-S/RichUNO"

#include <RichUNOTM1637.h>

node {
    static_assert(isValidDigitalPort(constant_input_pinCLK), "must be a valid digital port");
    static_assert(isValidDigitalPort(constant_input_pinDIO), "must be a valid digital port");

    meta {
        using Type = TM1637*;
    }

    uint8_t mem[sizeof(TM1637)];

    void evaluate(Context ctx){
        if (!isSettingUp()) return;
        Type Display = new (mem) TM1637(constant_input_pinCLK, constant_input_pinDIO);
        emitValue<output_1637_2U0027>(ctx, Display);
    }
}