SparkFun_APDS-9960_Sensor_Arduino_Library icon indicating copy to clipboard operation
SparkFun_APDS-9960_Sensor_Arduino_Library copied to clipboard

[FEATURE] Support a clone with different device id

Open nicknugget opened this issue 2 years ago • 0 comments

Add support for a clone of the APDS9960 with a different device id (0xA8) which otherwise cannot be initialized.

Apparently there are clones of the APDS9960 that use a different device ID than the original. For these, the initialisation then fails.

SparkFun_APDS-9960.h: Addition of the new ID

SparkFun_APDS-9960.cpp: Extension of the if-condition in the class sparkFun_APDS9960::init() to take the new ID into account during initialisation.

The changes to the code are minimal and should not create any further side effects.

nicknugget avatar Sep 17 '23 12:09 nicknugget