BLE - HID 键盘

材料准备

  • AmebaD [AMB21 / AMB22 / AMB23 / BW16] x 1

  • 支援 BLE 的设备 [Windows / Linux / MacOS / Android]

范例说明

介绍

在此范例中,RTL8722 开发板用来模拟使用 BLE 连接的 HID 键盘。

流程

打开范例,”Files” -> “Examples” -> “AmebaBLE” -> “BLEHIDKeyboard”。

1

Upload the code and press the reset button once the upload is finished. Immediately after reset, the board will begin BLE advertising as “AMEBA_BLE_HID”. On your host device, go to the Bluetooth settings menu, scan, and connect to the board. You should ensure that the connection process is completed before proceeding. On Windows, ensure that any driver installation is finished, and the board shows up in the Bluetooth menu under the “Mouse, keyboard & pen” category.

2

在 Android 上,确保为开发板启用“Input device”。

3

After the Bluetooth connection process is completed, the board is ready to send mouse input to the host device. Connect digital pin 8 to 3.3V to start sending input, and connect to GND to stop. You should see the text “Hello World !” typed out and deleted repeatedly.

4