From 35782c41aa652cc03bd3f0091bdac29fd01d35b6 Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Tue, 14 Apr 2020 11:02:36 +0200 Subject: [PATCH] Add APDS-9960 chip A8 sensor support Signed-off-by: Mickael Gaillard --- tasmota/xsns_27_apds9960.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasmota/xsns_27_apds9960.ino b/tasmota/xsns_27_apds9960.ino index cdb390c73..1751eb947 100644 --- a/tasmota/xsns_27_apds9960.ino +++ b/tasmota/xsns_27_apds9960.ino @@ -56,6 +56,7 @@ #define APDS9960_CHIPID_1 0xAB #define APDS9960_CHIPID_2 0x9C +#define APDS9960_CHIPID_3 0xA8 #define APDS9930_CHIPID_1 0x12 // we will check, if someone got an incorrect sensor #define APDS9930_CHIPID_2 0x39 // there are case reports about "accidentially bought" 9930's @@ -1884,7 +1885,7 @@ void APDS9960_detect(void) if (APDS9960type || I2cActive(APDS9960_I2C_ADDR)) { return; } APDS9960type = I2cRead8(APDS9960_I2C_ADDR, APDS9960_ID); - if (APDS9960type == APDS9960_CHIPID_1 || APDS9960type == APDS9960_CHIPID_2) { + if (APDS9960type == APDS9960_CHIPID_1 || APDS9960type == APDS9960_CHIPID_2 || APDS9960type == APDS9960_CHIPID_3) { if (APDS9960_init()) { I2cSetActiveFound(APDS9960_I2C_ADDR, APDS9960stype);