From b26ea25bd33f053500f86847f0ad07e9d028d561 Mon Sep 17 00:00:00 2001 From: Dylan Herrada Date: Wed, 8 May 2019 09:08:11 -0400 Subject: [PATCH 1/2] Added time.sleep at the end of __init__ --- adafruit_htu21d.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/adafruit_htu21d.py b/adafruit_htu21d.py index fb2a1d2..279f120 100644 --- a/adafruit_htu21d.py +++ b/adafruit_htu21d.py @@ -52,6 +52,8 @@ from adafruit_bus_device.i2c_device import I2CDevice from micropython import const +import time + __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_HTU21D.git" @@ -87,6 +89,7 @@ def __init__(self, i2c_bus, address=0x40): self.i2c_device = I2CDevice(i2c_bus, address) self._command(_RESET) self._measurement = 0 + time.sleep(0.01) def _command(self, command): with self.i2c_device as i2c: From 38af9b50467a8edf8550a1d3732ffaa65a62baee Mon Sep 17 00:00:00 2001 From: Dylan Herrada Date: Wed, 8 May 2019 09:15:01 -0400 Subject: [PATCH 2/2] Reordered imports to make travis happy --- adafruit_htu21d.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/adafruit_htu21d.py b/adafruit_htu21d.py index 279f120..acc4280 100644 --- a/adafruit_htu21d.py +++ b/adafruit_htu21d.py @@ -49,11 +49,10 @@ except ImportError: import ustruct as struct +import time from adafruit_bus_device.i2c_device import I2CDevice from micropython import const -import time - __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_HTU21D.git"