I have created a custom board based off of the Arduino Lillypad USB board. I also wrote a simple library that wraps the Keyboard library and provides some other functions to work with my board. The library and board files can be found here: https://github.com/oschwartz10612/Scanner-Pro-MK3/tree/master/arduino_board
My problems comes when trying to compile the simple sketch. On macOS it compiles fine and uploads, but on Windows I get the following error when compiling with my board.
fatal error: HID.h: No such file or directory
It is my understanding that Keyboard only compiles correctly if it is using a supported board. Lillypad USB should be compatible and is the derivative of my board, though some things may have changed and I am unable to identify what those are.
I figured I would update the current situation with the things I have tried:
- Including the HID library in the libraries folder.
- Including the Keyboard.h library.
- Including the HID cpp and header files in the cores folder.
- Copying over the arduino cores folder and libraries folder.
- Checking boards.txt and the other folders and filed to try to understand how Keyboard compiles for supported boards.
I am at a loss. I cant get this thing to compile.
I have further tried reverse analyzing other boards.txt and packages to understand the issue here but to no avail. I tried removing the cores folder from my package as do other packages but the IDE could then not find the Arduino.h file.
Why does HID compile for Lillypad USB and micro and not my board despite my package being a clone of the Arduino package? Furthermore with the boards.txt and bootloader being essentially the same with changed names?
I really dont know what to do here guys. Any point in the right direction would be appreciated.
The updated package is here: https://github.com/oschwartz10612/Scanner-Pro-MK3/tree/master/arduino_board
It must be in the code...
If I understand correctly, you are referring to the sketch? I still get the error simply by including Keyboard.h.
I appreciate the response!