diff --git a/src/pi/temp_sensor/temp_sensor/temp_sensor.py b/src/pi/temp_sensor/temp_sensor/temp_sensor.py index 9576bd71..3f99c9fc 100644 --- a/src/pi/temp_sensor/temp_sensor/temp_sensor.py +++ b/src/pi/temp_sensor/temp_sensor/temp_sensor.py @@ -4,6 +4,8 @@ import tsys01 +READING_TIMER_PERIOD = 0.5 # Seconds + class TempSensor(Node): @@ -13,8 +15,7 @@ def __init__(self) -> None: self.sensor = tsys01.TSYS01() self.sensor.init() - timer_period = 0.1 # seconds - self.timer = self.create_timer(timer_period, self.timer_callback) + self.timer = self.create_timer(READING_TIMER_PERIOD, self.timer_callback) def timer_callback(self) -> None: try: