To use the node in your project you should have the cesars/4017-km 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/MajicDesigns/MD_4017_KM"
//#pragma XOD require "https://github.com/Cesar-S/MD_4017_KM"
{{#global}}
#include <MD_4017_KM.h>
{{/global}}
struct State {
uint8_t mem[sizeof(MD_4017_KM)];
};
using Type = MD_4017_KM*;
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
if (!isSettingUp())
return;
auto state = getState(ctx);
Type KM = new (state->mem) MD_4017_KM((uint8_t)getValue<input_numKeys>(ctx), (uint8_t)getValue<input_pinClk>(ctx),
(uint8_t)getValue<input_pinKeys>(ctx), (uint8_t)getValue<input_pinRst>(ctx));
KM->begin();
emitValue<output_DEV>(ctx, KM);
}