arcore icon indicating copy to clipboard operation
arcore copied to clipboard

Any information for using HID with arcore?

Open Reggi3 opened this issue 10 years ago • 3 comments

Hi, I read that arcore is capable of being a HID firmware, do you have any examples of it's usage at all?

Reggi3 avatar Mar 03 '14 16:03 Reggi3

What exactly do you want to do? What board are you using? Note that you'll need an Arduino Leonardo, Arduino Micro or similar board.

If you just want to do keyboard and/or mouse emulation, you don't need arcore at all - you can just use the standard Arduino cores. See this example.

If you want to emulate a different HID device, for example a joystick, you'll need to write your own USB firmware for the Arduino. For this you can use arcore as a starting point. You can look at how the keyboard and mouse is implemented in the following files:

https://github.com/rkistner/arcore/blob/master/avr/cores/arcore/HID.cpp https://github.com/rkistner/arcore/blob/master/avr/cores/arcore/USBAPI.h https://github.com/rkistner/arcore/blob/master/avr/cores/arcore/USBDesc.h

Note that arcore is forked from the main Arduino codebase, and the HID functionality is exactly the same. However, the fact that it's a separate repository should make it easier to modify/extend.

rkistner avatar Mar 03 '14 16:03 rkistner

Hi, I'm using an arduino leonardo, I've been using arcore extensively for midi for a few weeks, now I have a project where I'd like to be able to send raw HID.

Reggi3 avatar Mar 03 '14 16:03 Reggi3

Ok, in that case you'll have to write the USB firmware from the USB HID specification yourself, as mentioned above.

My USB notes might also help.

rkistner avatar Mar 04 '14 06:03 rkistner