How can i send 8-bit data or binary data with pyserial?
Diez B. Roggisch
deetsNOSPAM at web.de
Mon Dec 13 08:55:31 EST 2004
> I want to transfer 0 bit and 1 bit in order with pyserial.But pyserial
> only send string data.
Convert your data to numbers and use module struct to create strings out of
it.
Apart from that: You can only send chunks of bits as configured in your
serial settings - e.g. 8N1 means that you will have to send 8 Bits in a
row. I personally never used anything else, but it might be possible to
alter that setting to lets say 7N1 or even lower numeber - but I doubt that
this will work down to 1N1.
If you give us more details on your actual problem, we migh be able to give
better answers.
--
Regards,
Diez B. Roggisch
More information about the Python-list
mailing list