代码之家  ›  专栏  ›  技术社区  ›  Gustavo Matuck

App Inventor 2:找不到特定块

  •  0
  • Gustavo Matuck  · 技术社区  · 11 年前

    在App Inventor 2中,url的最后一项(图)中提到的块在哪里: http://beta.appinventor.mit.edu/learn/reference/blocks/definition.html

    我正在尝试使用蓝牙将我的自定义设备与Android应用程序连接。

    互联网上说:

    该模块提供了一个“虚拟插座”,用于安装具有 将其左侧插入没有插座的地方,例如 过程或if块的do部分中的块序列。 将运行适合的块,但其返回的结果为 忽略。如果定义的过程返回 结果,但希望在不接受 后果

    1 回复  |  直到 11 年前
        1
  •  0
  •   Taifun    11 年前

    您正在查找 evaluate but ignore result
    enter image description here

    然而,在您的蓝牙连接示例中,我建议您改用if语句

    如果BluetoothClient1.connect。。。
    然后做点什么
    否则显示消息,例如“连接未成功”

    另请参见 this bluetooth example
    并查看 documentation of the Bluetooth components

    布尔连接(文本地址)
    使用指定的地址和串行端口配置文件(SPP)连接到蓝牙设备。
    如果连接成功,则返回true。