We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c8ed232 + 0612a5f commit 130355fCopy full SHA for 130355f
adafruit_ens160.py
@@ -108,8 +108,8 @@ class ENS160:
108
def __init__(self, i2c_bus: I2C, address: int = ENS160_I2CADDR_DEFAULT) -> None:
109
self.i2c_device = i2c_device.I2CDevice(i2c_bus, address)
110
111
- if self.part_id != 0x160:
112
- raise RuntimeError("Unable to find ENS160, check your wiring")
+ if self.part_id not in {0x160, 0x161}:
+ raise RuntimeError("Unable to find ENS160 or ENS161, check your wiring")
113
self.clear_command()
114
self.mode = MODE_STANDARD
115
self._buf = bytearray(8)
0 commit comments