|
16 | 16 | print("Temperature Resolution: ", htu.temp_resolution)
|
17 | 17 | print("Humidity Resolution: ", htu.humidity_resolution)
|
18 | 18 |
|
19 |
| - |
20 | 19 | # Setting the temperature resolution.
|
21 | 20 | # Possible values are "0.040", "0.025", "0.016" and "0.012"
|
22 |
| -htu.temp_resolution = "0.016" |
| 21 | +htu.temp_resolution = "0.040" |
23 | 22 |
|
24 | 23 | # Setting the Relative Humidity resolution.
|
25 | 24 | # Possible values are "0.020%", "0.014%", "0.010%" and "0.007%"
|
26 |
| -htu.humidity_resolution = "0.007%" |
| 25 | +htu.humidity_resolution = "0.020%" |
27 | 26 |
|
28 | 27 | print("Temperature Resolution: ", htu.temp_resolution)
|
29 | 28 | print("Humidity Resolution: ", htu.humidity_resolution)
|
|
33 | 32 |
|
34 | 33 | while True:
|
35 | 34 | for humidity_resolution in hum_res:
|
| 35 | + htu.humidity_resolution = humidity_resolution |
36 | 36 | print(f"Current Humidity Resolution: {humidity_resolution}")
|
37 |
| - for _ in range(3): |
| 37 | + for _ in range(2): |
38 | 38 | print(f"Humidity: {htu.relative_humidity:.2f}")
|
39 | 39 | print(f"Temperature: {htu.temperature:.2f}")
|
40 | 40 | print("")
|
41 | 41 | time.sleep(0.5)
|
42 | 42 | for temperature_resolution in temp_res:
|
| 43 | + htu.temp_resolution = temperature_resolution |
43 | 44 | print(f"Current Temperature Resolution: {temperature_resolution}")
|
44 |
| - for _ in range(3): |
| 45 | + for _ in range(2): |
45 | 46 | print(f"Humidity: {htu.relative_humidity:.2f}")
|
46 | 47 | print(f"Temperature: {htu.temperature:.2f}")
|
47 | 48 | print("")
|
48 | 49 | time.sleep(0.5)
|
| 50 | + |
0 commit comments