Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added time.sleep at the end of __init__ #5

Merged
merged 2 commits into from
May 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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