0

I have problem with my pys60 code. Problem in this part of code :

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")

I have send bytes (in ASCII) from my arduino. But I can't receive the bytes on my pys60 phone. In this part of code data compares with bytes and then opens the note. But still nothing. Why? I send bytes from arduino by the serial.write.

DIF
  • 2,470
  • 6
  • 35
  • 49
  • 1
    Its not clear what type of connection you are setting up. Arduino's serial uses rs232 and one would guess that "mySocket" is based on TCP/Ethernet. Are you receiving any bytes at all? Maybe try using a switch statement with a default output for unhandled input. – jdh Feb 14 '12 at 15:22
  • What exactly are you doing on your phone? – gotnull Feb 17 '12 at 04:34

0 Answers0