I want to make a simple program to put on my Arduino/Genuino (Sunfounder) Uno board that when plugged in, it invokes the Keyboard.print()
function. When I compile my program to do that, it says that I'm not including Keyboard.h
even though I actually am at the beginning of my program.
My code:
#include <Keyboard.h>
void setup() {
Keyboard.begin();
Keyboard.print("Hello, world!");
Keyboard.end();
}
void loop() {
}
When I compile the code, I get this error:
KeyboardMessage:4:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
I checked my libraries file in the Arduino sketch editor file and Keyboard.h
is there.
Any help is appreciated.