/[svn.andrew.net.au]/scripts/read-temperature.py
ViewVC logotype

Diff of /scripts/read-temperature.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 18 by apollock, Sun May 27 17:09:49 2007 UTC revision 19 by apollock, Sun May 27 18:28:36 2007 UTC
# Line 59  ser = serial.Serial(options.device, 9600 Line 59  ser = serial.Serial(options.device, 9600
59    
60  ser.write(SENSOR_QUERY_CMD[options.sensor])  ser.write(SENSOR_QUERY_CMD[options.sensor])
61  buf = ser.read(8)  buf = ser.read(8)
62    ser.close()
63    
64  temp = ord(buf[0]) | (ord(buf[1]) << 8)  temp = ord(buf[0]) | (ord(buf[1]) << 8)
65    

Legend:
Removed from v.18  
changed lines
  Added in v.19

  ViewVC Help
Powered by ViewVC 1.1.22