set-debounce

britt/sparkfun-qwiicpir/set-debounce

No description
set-debounce
@/set-debounce
DEV@/qwiicpir-device
DEBnumber
UPDpulse
set-debounce
DEV
DEB
UPD
DONE
DONE pulse
To use the node in your project you should have the britt/sparkfun-qwiicpir 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 {
    // Internal state variables defined at this level persists across evaluations
    void evaluate(Context ctx) {

        if (!isInputDirty<input_UPD>(ctx))
            return;

        auto pir = getValue<input_DEV>(ctx);
        pir -> setDebounceTime(getValue<input_DEB>(ctx));

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