小编Coo*_*ton的帖子

即使我包含 Keyboard.h,也找不到键盘

我想制作一个简单的程序,放在我的 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它在那里。

任何帮助表示赞赏。

c++ arduino arduino-uno

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

arduino ×1

arduino-uno ×1

c++ ×1