[pyar] Pyserial: enviando datos hexadecimales de un byte

Santiago Paleka santiagopaleka en gmail.com
Jue Dic 9 12:47:46 ART 2010


> O mejor aun, struct:
>
>>>> import struct
>>>> tupla = (0x10, 0x11, 0x45, 0xf4)
>>>> s = struct.pack(4 * 'B', *tupla)
>>>> s
> '\x10\x11\x45\xf4'
>>>> pserie.write(s)
>
> --
> Ramiro Morales

El problema ahora está al enviar '\x11' y otros valores que no se por
que no los envía.



More information about the pyar mailing list