Skip to content

Commit 43b7df2

Browse files
authored
Merge pull request #45 from dertobias/patch-1
add different device ID
2 parents cd01e25 + 88d730c commit 43b7df2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_apds9960/apds9960.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
# Only one address is possible for the APDS9960, no alternates are available
5353
_APDS9960_I2C_ADDRESS = const(0x39)
54-
_DEVICE_ID = const(0xAB)
54+
_DEVICE_IDS = (const(0xAB), const(0xA8))
5555

5656
# APDS9960_RAM = const(0x00)
5757
_APDS9960_ENABLE = const(0x80)
@@ -183,7 +183,7 @@ def __init__(
183183

184184
self.i2c_device = I2CDevice(i2c, _APDS9960_I2C_ADDRESS)
185185

186-
if self._read8(_APDS9960_ID) != _DEVICE_ID:
186+
if self._read8(_APDS9960_ID) not in _DEVICE_IDS:
187187
raise RuntimeError()
188188

189189
if reset:

0 commit comments

Comments
 (0)