Line 70... |
Line 70... |
70 |
gauge8 = cfg.get_device("altimet8") |
70 |
gauge8 = cfg.get_device("altimet8") |
71 |
time.sleep(0.5) |
71 |
time.sleep(0.5) |
72 |
|
72 |
|
73 |
#### Data Logging ################################################### |
73 |
#### Data Logging ################################################### |
74 |
|
74 |
|
75 |
ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=1) |
75 |
#ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=1) |
76 |
print ser.name |
76 |
#print ser.name |
77 |
ser.write("hello") |
77 |
#ser.write("hello") |
78 |
#http://pyserial.sourceforge.net/shortintro.html |
78 |
#http://pyserial.sourceforge.net/shortintro.html |
79 |
line = ser.readline() # read a '\n' terminated line |
79 |
#line = ser.readline() # read a '\n' terminated line |
80 |
ser.close() |
80 |
#ser.close() |
81 |
|
81 |
|
82 |
try: |
82 |
try: |
83 |
with open("temperature.log", "a") as f: |
83 |
with open("temperature.log", "a") as f: |
84 |
while True: |
84 |
while True: |
85 |
sys.stdout.write("Start measurement now? [ENTER]") |
85 |
sys.stdout.write("Start measurement now? [ENTER]") |