is there a problem on this simple code

John Machin sjmachin at lexicon.net
Sat Mar 12 20:35:50 EST 2005


mensanator at aol.com wrote:
>
> What actually gets transmitted is "C\x01\x02\x10'\x83".

No, that's repr(What actually gets transmitted)

> That's 18 bytes. Is the command supposed to be the ASCII
> characters \x01 or a single byte whose value is 1?

For a start, according to the OP's code, the command ('C' a.k.a. 67) is
first. The 1 is a meant to be a message number.

Secondly, the hardware smells like it's got an 8080 or 6502 inside. The
likelihood that it groks Python/C string representation is minimal.
Folk just don't send 18 bytes at 9600 bps when 6 bytes will do.




More information about the Python-list mailing list