NicoHood / HID

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

Arduino Zero Compatibility? #361

Open GamerSocke opened 2 years ago

GamerSocke commented 2 years ago

Hi, After flashing the following code to the Zero via the native USB port, it does not show up as a gamepad like the Uno with the Hoodloader2. Is there anything I need to be aware of when using the Zero?


#include "HID-Project.h"
void setup() {
    analogReadResolution(12);
    Gamepad.begin();
}

void loop() {
    int data = analogRead(A0);
    Gamepad.rxAxis(data);
    Gamepad.write();
    delay(10);
}
NicoHood commented 2 years ago

I don't know. I remember such a bug report, but I cannot find it.

GamerSocke commented 2 years ago

How can I investigate the problem further, do you have any idea what I could start with?

NicoHood commented 2 years ago

Does the bootkeyboard work? Does the official arduino keyboard library work?

hlcm0 commented 2 years ago

I have a same question too, looks like neither RawHID and Joystick works properly on SAMD21. But NKROKeyboard and mouse works fine.

mcuee commented 1 year ago

For SAMD21, maybe you will have better luck with another library. https://github.com/adafruit/Adafruit_TinyUSB_Arduino

I have no isssues running the example here from hidapitester. https://github.com/todbot/hidapitester/tree/master/test_hardware/hidtest_tinyusb