ADD i2c dev

Fork of APDS_9960 by Krishan Bhagat

Files at this revision

API Documentation at this revision

Comitter:
tgw
Date:
Sat Nov 25 02:43:52 2017 +0000
Parent:
2:ba051af6731a
Commit message:
TEST

Changed in this revision

glibr.cpp Show annotated file Show diff for this revision Revisions of this file
glibr.h Show annotated file Show diff for this revision Revisions of this file
--- a/glibr.cpp	Mon Apr 27 02:05:49 2015 +0000
+++ b/glibr.cpp	Sat Nov 25 02:43:52 2017 +0000
@@ -27,7 +27,7 @@
         
      id=I2CreadByte(APDS9960_I2C_ADDR, APDS9960_ID);
     
-    if( (!(id == APDS9960_ID_1 || id == APDS9960_ID_2))||id==ERROR) {
+    if( (!(id == APDS9960_ID_1 || id == APDS9960_ID_2 || id == APDS9960_ID_3))||id==ERROR) {
          return false;
     }
     
--- a/glibr.h	Mon Apr 27 02:05:49 2015 +0000
+++ b/glibr.h	Sat Nov 25 02:43:52 2017 +0000
@@ -17,6 +17,7 @@
 /* Acceptable device IDs */
 #define APDS9960_ID_1           0xAB
 #define APDS9960_ID_2           0x9C 
+#define APDS9960_ID_3           0xA8
 
 /* Misc parameters */
 #define FIFO_PAUSE_TIME         0.30      // Wait period (ms) between FIFO reads