Parsing data from pyserial

Si Ballenger shb*NO*SPAM* at comporium.net
Sun Dec 3 13:27:23 EST 2006


On Sun, 03 Dec 2006 16:52:33 -0000, Grant Edwards
<grante at visi.com> wrote:

>On 2006-12-03, Si Ballenger <shb*NO*SPAM*@comporium.net> wrote:
>
>> In my dealing with serial gizmos I have to put a delay between
>> the request sent to the gizmo and the reading of the serial input
>> buffer for returned data. Serial ports and gizmos need some time
>> to do their thing.
>
>I doubt that's the issue.  He's reading with a 1-second timeout
>value.

I would think a time delay would be needed between the below two
lines in the code if he expects to get a useable data string back
from the gizmo for the command sent to it. 

  ser.write("TC 016 240 100 240 016 240\r\n")
  reading = ser.read(40)



More information about the Python-list mailing list