Skip to content

Commit 163a192

Browse files
committed
sleep after reset before read register
1 parent 318333e commit 163a192

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

adafruit_si7021/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
2626
"""
2727
import struct
28+
import time
2829

2930
from adafruit_bus_device.i2c_device import I2CDevice
3031
from micropython import const
@@ -137,6 +138,7 @@ class SI7021:
137138
def __init__(self, i2c_bus: I2C, address: int = 0x40) -> None:
138139
self.i2c_device = I2CDevice(i2c_bus, address)
139140
self._command(_RESET)
141+
time.sleep(0.015)
140142
# Make sure the USER1 settings are correct.
141143
while True:
142144
# While restarting, the sensor doesn't respond to reads or writes.

0 commit comments

Comments
 (0)