我正在使用bbc:microbit使用bluetooth web api来访问microbit服务数据(按钮事件、led、磁力计等)。
看起来光传感器信息不能从javascript API访问。从microbit文档来看,可以从led服务访问光传感,但看起来lib缺少它们。
发布于 2020-09-13 05:07:48
micro:bit蓝牙配置文件在以下位置定义:
https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html
默认情况下,它不会通过蓝牙暴露光传感器信息。我最初的想法是,可以通过蓝牙UART服务发送该值。我使用位于:https://makecode.microbit.org/#editor的编辑器为micro创建了一个十六进制文件,该文件似乎可以工作:

https://stackoverflow.com/questions/63367507
复制相似问题