NicoHood / HID

Bring enhanced HID functions to your Arduino!
http://www.nicohood.de
MIT License
2.38k stars 409 forks source link

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

Open bsperryn opened 3 years ago

bsperryn commented 3 years ago

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

bsperryn commented 3 years ago

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.

bsperryn commented 3 years ago

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.```
NicoHood commented 3 years ago

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

itavero commented 3 years ago

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

NicoHood commented 3 years ago

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: https://github.com/arduino/ArduinoCore-mbed/issues/107