Re: Serial Port
This post is from the topic: Serial Port
EDIT POST Post #20123 Mark as Spam markwalker84
Posts: 1 - Registered: 2007-01-29 08:42:14
Im really struggling here...
Im trying to communicate with a piece of hardware that accepts a specific package format for control.
I need to be able to send an 8 bit data word via a serial connection from my Python program.
I have been using USPP & PySerial so far but have found a problem. Both those modules rely on file-style operation... writing strings etc. So so far i have been converting my 8bits of data to the relevant ASCII character and writing that to the port.
The problem occurs when i need to send a packet that has a value of less than 0x20... as from this point the relevant character is no longer printable (carriage return, tab etc) and so it cant be written as such.
Does anybody know of a way to send raw data in binary form to the serial port?