# HG changeset patch # User Paul Fisher # Date 1690677221 14400 # Node ID 1ae7bd2566ef0c4b555cf015feca9559f34ce301 # Parent 92367b644e292bd6c4808f9c05fd9e583e35ab69 Add a sleep immediately after opening the i2c bus. diff -r 92367b644e29 -r 1ae7bd2566ef weatherlog/reader.py --- a/weatherlog/reader.py Sat Dec 25 00:02:03 2021 +0000 +++ b/weatherlog/reader.py Sat Jul 29 20:33:41 2023 -0400 @@ -27,6 +27,9 @@ def __init__(self, bus_id: int = 1, address: int = 0x77): self.bus = smbus2.SMBus(bus_id) + # Maybe this will prevent some hangs? + # I saw it somewhere but don't remember where... + time.sleep(1) self.address = address self.calibration = bme280.load_calibration_params(self.bus, address)