Skip to content

Commit e660e71

Browse files
author
Mickael
committed
allow change i2c address
1 parent c87e618 commit e660e71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_sht4x.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ class SHT4x:
9090
9191
"""
9292

93-
def __init__(self, i2c_bus):
94-
self.i2c_device = i2c_device.I2CDevice(i2c_bus, _SHT4X_DEFAULT_ADDR)
93+
def __init__(self, i2c_bus, i2c_addr=_SHT4X_DEFAULT_ADDR):
94+
self.i2c_device = i2c_device.I2CDevice(i2c_bus, i2c_addr)
9595
self._buffer = bytearray(6)
9696
self.reset()
9797
self._mode = Mode.NOHEAT_HIGHPRECISION # pylint: disable=no-member

0 commit comments

Comments
 (0)