Skip to content

Commit 24f7a13

Browse files
authored
Update Thermometer.py
1 parent c523bd6 commit 24f7a13

1 file changed

Lines changed: 24 additions & 23 deletions

File tree

src/Thermometer.py

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,35 @@ def __init__(self):
1111
}
1212

1313
def reset(self) -> None:
14-
for light in self.lights:
15-
self.lights[light].on()
16-
sleep(1)
17-
self.lights_out()
14+
"""
15+
Reset the thermometer's lights sequence.
16+
"""
17+
# TODO
18+
pass
1819

1920
def lights_out(self) -> None:
20-
for light in self.lights:
21-
self.lights[light].off()
21+
"""
22+
Turn all lights in self.lights off.
23+
"""
24+
# TODO
25+
pass
2226

2327
def set_led_output(self) -> None:
24-
# Turn all lights off
25-
self.lights_out()
26-
# We'll use F after all
27-
led = None
28-
if self.temp_in_f <= 32:
29-
led = "blue"
30-
elif 32 < self.temp_in_f <= 70:
31-
led = "yellow"
32-
else:
33-
led = "red"
34-
self.lights[led].on()
35-
36-
def calculate_temps(self, voltage: float) -> None:
37-
self.convert_temp_to_c(voltage)
38-
self.convert_temp_to_f()
28+
"""
29+
Set the LED output based on the current temperature in Fahrenheit.
30+
"""
31+
# TODO
32+
pass
3933

4034
def convert_temp_to_c(self, voltage: float) -> None:
41-
self.temp_in_c = 27 - (voltage - 0.706) / 0.001721
35+
"""
36+
Convert the voltage reading from the temperature sensor to Celsius and store it in self.temp_in_c."""
37+
# TODO
38+
pass
4239

4340
def convert_temp_to_f(self) -> None:
44-
self.temp_in_f = (self.temp_in_c * 9/5) + 32
41+
"""
42+
Convert the temperature in Celsius to Fahrenheit and store it in self.temp_in_f.
43+
"""
44+
# TODO
45+
pass

0 commit comments

Comments
 (0)