Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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