Hi,
I was trying to recreate this Arduino Volume Knob on XOD, although I’m thankful for nkrkv’s HID library, the library only able to simulate keyboard.
And since I didn’t learn C++ prior, I was thinking about using nkrkv’s library as base code and tweaking it into NicoHood’s HID library. This is the code I have tweaked:
#pragma XOD require “GitHub - NicoHood/HID: Bring enhanced HID functions to your Arduino!”
{{#global}}
#include <HID-Project.h>
{{/global}}using Type = Keyboard*;
using Type = Consumer*;struct State {
};{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto kb = &Keyboard;
if (isInputDirty<input_INIT>(ctx))
kb->begin();
Consumer->begin();emitValue<output_DEV>(ctx, kb);
}
However, I get this error message instead:
I tried to read as much documentation as possible but those documentations is guiding to create hardware library, so it’s hard for me to tweak their codes into HID library.
Does anybody able to teach me how to create NicoHood’s HID library? Many thanks