From b353e60eda14747aec841ef1ffc09deee98fbf57 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 20 Aug 2019 22:07:18 -0700 Subject: [PATCH] Remove stop kwarg and use write_then_readinto. See https://github.com/adafruit/circuitpython/issues/2082 for details. --- adafruit_si7021.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/adafruit_si7021.py b/adafruit_si7021.py index 05b217d..b94f3a9 100644 --- a/adafruit_si7021.py +++ b/adafruit_si7021.py @@ -89,8 +89,7 @@ def __init__(self, i2c_bus, address=0x40): try: data = bytearray([_READ_USER1]) with self.i2c_device as i2c: - i2c.write(data, stop=False) - i2c.readinto(data) + i2c.write_then_readinto(data, data) value = data[0] except OSError: pass