Mercurial > personal > weatherlog
changeset 26:ec575bfd68cd v0.4.0
Reduce noise by oversampling a bunch!
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 02 Mar 2025 19:33:38 -0500 |
parents | 2ec668fdec88 |
children | 0ffe7f97acdb |
files | weatherlog/reader.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/weatherlog/reader.py Sun Mar 02 19:33:21 2025 -0500 +++ b/weatherlog/reader.py Sun Mar 02 19:33:38 2025 -0500 @@ -34,7 +34,9 @@ self.calibration = bme280.load_calibration_params(self.bus, address) def read(self) -> types.Reading: - reading = bme280.sample(self.bus, self.address, self.calibration) + reading = bme280.sample( + self.bus, self.address, self.calibration, + oversampling=bme280.oversampling.x4) return types.Reading.from_now( temp_c=reading.temperature, rh_pct=reading.humidity,