Skip to content

Commit c739251

Browse files
authored
Merge pull request #13 from tannewt/remove_stop
Remove stop kwarg and use write_then_readinto.
2 parents b5e8d72 + b353e60 commit c739251

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

adafruit_si7021.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ def __init__(self, i2c_bus, address=0x40):
8989
try:
9090
data = bytearray([_READ_USER1])
9191
with self.i2c_device as i2c:
92-
i2c.write(data, stop=False)
93-
i2c.readinto(data)
92+
i2c.write_then_readinto(data, data)
9493
value = data[0]
9594
except OSError:
9695
pass

0 commit comments

Comments
 (0)