我的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发送字节。