/[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 23 by apollock, Fri Jun 1 00:22:36 2007 UTC revision 24 by apollock, Thu Jun 14 04:16:40 2007 UTC
# Line 23  Line 23 
23  # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.  # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  #  #
25    
26    import sys
27  try:  try:
28    import serial    import serial
29  except ImportError:  except ImportError:
30    print "This program requires pyserial,", \    print "This program requires pyserial,", \
31      "try checking the python-serial package is installed"      "try checking the python-serial package is installed"
32      sys.exit(-1)
33    
34  from optparse import OptionParser  from optparse import OptionParser
 import sys  
35    
36  def read_temperature(device, sensor):  def read_temperature(device, sensor):
37    ser = serial.Serial(device, 9600, timeout=1)    ser = serial.Serial(device, 9600, timeout=1)

Legend:
Removed from v.23  
changed lines
  Added in v.24

  ViewVC Help
Powered by ViewVC 1.1.22