Line 42... |
Line 42... |
42 |
#### Data Logging ################################################### |
42 |
#### Data Logging ################################################### |
43 |
|
43 |
|
44 |
sys.stdout.write("ALTIMET data acquisition system started \n") |
44 |
sys.stdout.write("ALTIMET data acquisition system started \n") |
45 |
|
45 |
|
46 |
try: |
46 |
try: |
47 |
with open("temperature.log", "a") as f: |
- |
|
48 |
while True: |
47 |
while True: |
49 |
gauge.route() |
48 |
gauge.route() |
50 |
(t1, p1) = gauge.get_tp() |
49 |
(t1, p1) = gauge.get_tp() |
51 |
sys.stdout.write(" Temperature: %.2f Pressure: %d \n" % (t1, p1)) |
50 |
sys.stdout.write(" Temperature: %.2f Pressure: %d \n" % (t1, p1)) |
52 |
sys.stdout.flush() |
51 |
sys.stdout.flush() |