我正在尝试将带有蓝牙 (HC-06) 的 arduino 与安卓手机连接起来。我发现并应用了下面的 block ,但我只能在不扫描的情况下连接到配对设备。
如何使用 MIT App Inventor 2 扫描可用的蓝牙设备并连接它们?扫描操作的 block 应该是什么?
最佳答案
参见 documentation of the bluetooth component
如您所见,没有可用于扫描设备的 block ,您只能获取已配对蓝牙设备的列表....
AddressesAndNames
The addresses and names of paired Bluetooth devices
但是您可以创建自己的扩展并创建自己的 block ,有关更多信息,see the announcement here .
编辑:要扫描设备,您可以使用 classic bluetooth extension .
注意:我是该扩展的作者。
关于android - 使用 MIT App Inventor 2 扫描蓝牙设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34053144/