Skip to content

Commit

Permalink
Merge pull request #5 from dherrada/master
Browse files Browse the repository at this point in the history
Added time.sleep at the end of __init__
  • Loading branch information
ladyada authored May 8, 2019
2 parents b84a867 + 38af9b5 commit 08e07a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions adafruit_htu21d.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
except ImportError:
import ustruct as struct

import time
from adafruit_bus_device.i2c_device import I2CDevice
from micropython import const

Expand Down Expand Up @@ -87,6 +88,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:
Expand Down

0 comments on commit 08e07a8

Please sign in to comment.