Go Down

Topic: fatal error: HID.h: No such file or directory (Read 1 time) previous topic - next topic

JAHW

I'm sorry for such a basic question, but I'm trying to use the KeyboardSerial example included with the Arduino IDE. 

I added the Keyboard library, but it depends on HID. 

HID is described as a core library, but was not included in my recent Arduino IDE download, and I can't find the HID library anywhere including github.  Probably looking in the wrong place.

I would appreciate help.

pert

The HID library is architecture specific, so it is typically bundled with the hardware package of the boards of the architecture it was written for. The Arduino 101 developers never wrote an HID library, so that's why you can't use the Keyboard and Mouse libraries with your Arduino 101. Here's a more detailed explanation from one of Arduino's developers:
https://forum.arduino.cc/index.php?topic=425505.msg2932286#msg2932286
Quote
to become a Keyboard/Mouse an Arduino needs a programmable USB core (and native USB capabilities).
Leonardo, Micro, Zero allow this kind of operations, while the 101 uses the x86 RTOS as an USB-to-serial converter so it can't be directly modified.
If you feel brave, you could investigate how to enable x86 HID capabilities (the repository with the source code is here ); it's not an easy task but it's surely very rewarding :) !
It's possible a community member has written a 3rd party library to provide this functionality, but I didn't find any after a quick search. What I did find is a 3rd party library that does keyboard or mouse emulation over BLE:
https://github.com/mo10/Curie-bluetooth-HID-library

Go Up