我想制作一个简单的程序,放在我的 Arduino/Genuino (SunFounder) Uno 板上,当插入时,它会调用该Keyboard.print()函数。当我编译程序来执行此操作时,它说我没有包含在内,Keyboard.h即使我实际上处于程序的开头。
#include <Keyboard.h>
void setup() {
Keyboard.begin();
Keyboard.print("Hello, world!");
Keyboard.end();
}
void loop() {
}
Run Code Online (Sandbox Code Playgroud)
当我编译代码时,出现以下错误:
KeyboardMessage:4:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
我在 Arduino 草图编辑器文件中检查了我的库文件,并且Keyboard.h它在那里。
任何帮助表示赞赏。