NicoHood/HID

Doesn't work with nRF528x boards such as Nano 33 and Nano 33 Sense

Opened this issue · 5 comments

When I try compile this for a Nano 33, I get the following error:

#error HID Project can only be used with an USB MCU

I have found this library: https://github.com/arduino/ArduinoCore-mbed that seems to add the pluggableUSB functionality to these boards. Not yet sure how to combine the functionality of that library and this one.

I've installed the library I mentioned which has given me new core's to use that in theory allow pluggable USB to work. However I still get the following errors:

HID-Project.h:35:2: error: #error HID Project can only be used with an USB MCU.
 #error HID Project can only be used with an USB MCU.
  ^~~~~
In file included from HID-Project.h:39:0,
                 from test_HID-project.ino:1:
SingleReport/SingleAbsoluteMouse.h:28:10: fatal error: HID.h: No such file or directory
 #include "HID.h"
          ^~~~~~~
compilation terminated.
exit status 1
Error compiling for board Arduino Nano 33 BLE.```

Try to remove that line and check if it works:
https://github.com/NicoHood/HID/blob/master/src/HID-Project.h#L35

FYI: Just removing the check does not work. It results in the same error message as shown by @bsperryn above.

With which error message? It cannot be the same error message, if the check was removed.

Maybe this PR can be related to porting also other MCUs that support pluggable usb:
https://github.com/NicoHood/HID/pull/244/files

If the Hid.h file is missing, Make sure to install the HID library:
https://github.com/arduino/ArduinoCore-avr/blob/master/libraries/HID/src/HID.h

This library only works with avr devices. Here is the samd version:
https://github.com/arduino/ArduinoCore-samd/blob/master/libraries/HID/HID.h

It seems to be missing in the linked core. I recommend opening an issue there. But please check out my links first and verify yourself. You know that core better than me.

Edit: I think this issue will give you a good starting point:
arduino/ArduinoCore-mbed#107