android - 使用 MIT App Inventor 2 扫描蓝牙设备

标签 android bluetooth arduino app-inventor

我正在尝试将带有蓝牙 (HC-06) 的 arduino 与安卓手机连接起来。我发现并应用了下面的 block ,但我只能在不扫描的情况下连接到配对设备。

如何使用 MIT App Inventor 2 扫描可用的蓝牙设备并连接它们?扫描操作的 block 应该是什么?

enter image description here

最佳答案

参见 documentation of the bluetooth component

如您所见,没有可用于扫描设备的 block ,您只能获取已配对蓝牙设备的列表....

AddressesAndNames
The addresses and names of paired Bluetooth devices

但是您可以创建自己的扩展并创建自己的 block ,有关更多信息,see the announcement here .

顺便说一句...请参阅以下屏幕截图以了解如何正确连接 enter image description here

编辑:要扫描设备,您可以使用 classic bluetooth extension .
注意:我是该扩展的作者。

关于android - 使用 MIT App Inventor 2 扫描蓝牙设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34053144/

相关文章:

Android 屏幕方向尺寸

c++ - 使用 WASAPI 捕获蓝牙音频数据

bluetooth - 是否可以通过 PC 控制 Nintendo Switch 的游戏功能?

iphone - 在 MacOS 上通过命令行连接到蓝牙设备 (iPhone)

C++ : "undefined reference to WeightCalc::getHeavier(int)"

c++ - Arduino 上一次中断的多个触发器

java - 来自单例的两个对象

java - 如何使用按钮从 firebase 列表适配器和 firebase 中删除项目

java - 将信息备份到文件的 Activity 生命周期

c++ - Arduino Serial.available() 不断增加