self.sensor_type = sensor_type
// here we keep the temperature values after removing outliersself.filtered_temperature = []// here we keep the filtered humidity values after removing the outliers
self.filtered_humidity = []
// we are using an event so we can close the thread as soon as KeyboardInterrupt is raisedself.event = threading.Event()if self.sensor_type == 0:
self.set_descriptor("Blue DHT Sensor")
else:
self.set_descriptor("White DHT Sensor")
except Exception as e:
print("DHTSensor: {}".format(e))
raise ValueError("DHT Sensor not found")