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.
1 parent d907d45 commit 88d730cCopy full SHA for 88d730c
adafruit_apds9960/apds9960.py
@@ -51,7 +51,7 @@
51
52
# Only one address is possible for the APDS9960, no alternates are available
53
_APDS9960_I2C_ADDRESS = const(0x39)
54
-_DEVICE_ID = const(0xAB)
+_DEVICE_IDS = (const(0xAB), const(0xA8))
55
56
# APDS9960_RAM = const(0x00)
57
_APDS9960_ENABLE = const(0x80)
@@ -183,8 +183,8 @@ def __init__(
183
184
self.i2c_device = I2CDevice(i2c, _APDS9960_I2C_ADDRESS)
185
186
- #if self._read8(_APDS9960_ID) != _DEVICE_ID:
187
- # raise RuntimeError()
+ if self._read8(_APDS9960_ID) not in _DEVICE_IDS:
+ raise RuntimeError()
188
189
if reset:
190
# Disable prox, gesture, and color engines
0 commit comments