pyserial to read from DS1615 temperature recorder chip

Grant Edwards grante at visi.com
Mon Jul 24 14:51:35 EDT 2006


On 2006-07-24, alexandre_irrthum at yahoo.com <alexandre_irrthum at yahoo.com> wrote:

>>> import serial
>>> s = serial.Serial(0, baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None)
>>> s.write("\x33")
>>> s.write("\x00")
>>> s.write("\x00")
>>> s.read()   # "\x00" is returned here. This byte was already in the receive buffer before issueing the write commands.
>>> s.read()   # The interpreter is blocked here as there is nothing to read from the serial port.

Can you verify that the device is actually responding by
watching the data line with an oscilloscope?

> I'm completely clueless and would really appreciate your
> comments. If it helps, I can post a log from a serial port
> monitor captured when the provided T-logger program pulls data
> from the device,

I take it that means that other programs are able to read from
the device?

> as well as a log when pyserial is used.

Logs of the serial traffic would be helpful.

-- 
Grant Edwards                   grante             Yow!  It's the land of
                                  at               DONNY AND MARIE as promised
                               visi.com            in TV GUIDE!



More information about the Python-list mailing list