Skip to content

Commit 130355f

Browse files
authored
Merge pull request #8 from adafruit/ens161
update library for ens161
2 parents c8ed232 + 0612a5f commit 130355f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_ens160.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ class ENS160:
108108
def __init__(self, i2c_bus: I2C, address: int = ENS160_I2CADDR_DEFAULT) -> None:
109109
self.i2c_device = i2c_device.I2CDevice(i2c_bus, address)
110110

111-
if self.part_id != 0x160:
112-
raise RuntimeError("Unable to find ENS160, check your wiring")
111+
if self.part_id not in {0x160, 0x161}:
112+
raise RuntimeError("Unable to find ENS160 or ENS161, check your wiring")
113113
self.clear_command()
114114
self.mode = MODE_STANDARD
115115
self._buf = bytearray(8)

0 commit comments

Comments
 (0)