Pys60蓝牙插座数据字节比较

时间:2012-02-13 18:41:25

标签: bluetooth arduino pys60

我的pys60代码有问题。这部分代码存在问题:

def readline():
    ch=mySocket.recv(1)
        if(ch=='v'):
            appuifw.note(u"v", "info")

        if(ch=='w'):
            appuifw.note(u"w", "info")

        if(ch=='x'):
            appuifw.note(u"x", "info")

        if(ch=='y'):
            appuifw.note(u"y", "info")

        if(ch=='z'):
            appuifw.note(u"z", "info")

我已经从我的arduino发送字节(以ASCII格式)。但我无法在pys60手机上收到字节。在这部分代码中,数据与字节进行比较,然后打开注释。但仍然没有。为什么?我通过serial.write从arduino发送字节。

0 个答案:

没有答案