Arduino Due as a USB Keyboard

I'm trying to get the Arduino Due to work as a USB Keyboard.

I have a simple sketch which has worked on other Arduino's with Native USB support.

However I can't even get the Due to compile anything and its throwing an error with this output.

Arduino/libraries/Keyboard/src/Keyboard.h:25:17: fatal error: HID.h: No such file or directory
#include "HID.h"
compilation terminated.
Error compiling.

Now I can see its looking for hid.h which I have in two libraries USBHost and USBHostShield but Neither want to play ball.

Can someone give me a push in the right direction ?

Thanks heaps!


I dont know if this is the same as your problem, but when i went to do that on the Micro (Arduino) i had this:
#include Keyboard.h

and it gave an error for that line, and i found out later that you dont include that anymore. So i remmed it out:
//#include Keyboard.h

and it worked fine after that.

I dont know if this is the same with the Due though, i had not tried that yet.

Good luck with it.

I figured out my issue.

I have my board set as a ARDUINO DUEMILANOVE which I thought was the long name for an ARDUINO DUE.

Installed the correct board and Vola!

Works like a charm.

Noob mistake!!!!!

Thanks for your input though.


You're welcome.

I am seeing this a lot lately, people (including myself at one time) thinking that the "Due" is just a short hand name for "Duemilanove". Maybe "Due" was a poor choice for a new board name because of the possible confusion.