Skip to content

Commit

Permalink
Merge pull request #45 from dertobias/patch-1
Browse files Browse the repository at this point in the history
add different device ID
  • Loading branch information
FoamyGuy authored Nov 20, 2023
2 parents cd01e25 + 88d730c commit 43b7df2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adafruit_apds9960/apds9960.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

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

# APDS9960_RAM = const(0x00)
_APDS9960_ENABLE = const(0x80)
Expand Down Expand Up @@ -183,7 +183,7 @@ def __init__(

self.i2c_device = I2CDevice(i2c, _APDS9960_I2C_ADDRESS)

if self._read8(_APDS9960_ID) != _DEVICE_ID:
if self._read8(_APDS9960_ID) not in _DEVICE_IDS:
raise RuntimeError()

if reset:
Expand Down

0 comments on commit 43b7df2

Please sign in to comment.