CM3592 simple library
Revision 1:8547ec72dba2, committed 2018-04-27
- Comitter:
- johnathanlyu
- Date:
- Fri Apr 27 09:58:04 2018 +0000
- Parent:
- 0:a434d2ca0357
- Commit message:
- update library flow
Changed in this revision
CM3592.cpp | Show annotated file Show diff for this revision Revisions of this file |
CM3592.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r a434d2ca0357 -r 8547ec72dba2 CM3592.cpp --- a/CM3592.cpp Tue Jun 06 01:56:14 2017 +0000 +++ b/CM3592.cpp Fri Apr 27 09:58:04 2018 +0000 @@ -1,8 +1,8 @@ #include "CM3592.h" CM3592::CM3592(I2C& i2c) : m_i2c(i2c) { - config[0] = 0x00; //default LSB set 100ms integration. - config[1] = 0x30; //default MSB set Hight Sensitivity and High Dynamic Range. + config[0] = 0x00; //default LSB set 60ms integration. + config[1] = 0x82; //default MSB set Hight Sensitivity and High Dynamic Range. } int CM3592::init() {
diff -r a434d2ca0357 -r 8547ec72dba2 CM3592.h --- a/CM3592.h Tue Jun 06 01:56:14 2017 +0000 +++ b/CM3592.h Fri Apr 27 09:58:04 2018 +0000 @@ -6,10 +6,10 @@ #define CM3592_REG_CTRL 0x00 #define CM3592_REG_ALS_HIGH_THRESHOLD 0x02 #define CM3592_REG_ALS_LOW_THRESHOLD 0x03 -#define CM3592_REG_UV_DATA 0x04 -#define CM3592_REG_IR_DATA 0x05 -#define CM3592_REG_ALS_DATA 0x08 -#define CM3592_REG_WHITE_ALS_DATA 0x09 +#define CM3592_REG_UV_DATA 0x06 +#define CM3592_REG_UVB_DATA 0x07 +#define CM3592_REG_G_DATA 0x09 +#define CM3592_REG_IR_DATA 0x0B #define CM3592_REG_DEVICE_ID 0x0C #define CM3592_REG_ALS_CROSS_INT_EVENT 0x0D