Class which provides functions to control a TAOS TCS3472 Color Light-to-Digital Converter with IR Filter via I2C. (Tidied up)
Dependents: openwear-lifelogger-example
Fork of TCS3472_I2C by
Revision 5:d4cf0fa1a182, committed 2014-04-16
- Comitter:
- karlmaxwell67
- Date:
- Wed Apr 16 10:57:46 2014 +0000
- Parent:
- 4:5d1f8d7d81ff
- Child:
- 6:6d5bb4ad7d6e
- Commit message:
- _
Changed in this revision
TCS3472_I2C.cpp | Show annotated file Show diff for this revision Revisions of this file |
TCS3472_I2C.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/TCS3472_I2C.cpp Fri Mar 21 17:38:11 2014 +0000 +++ b/TCS3472_I2C.cpp Wed Apr 16 10:57:46 2014 +0000 @@ -1,7 +1,7 @@ #include "TCS3472_I2C.h" TCS3472_I2C::TCS3472_I2C( PinName sda, PinName scl ) : i2c( sda, scl ){ - i2c.frequency(400000); + i2c.frequency(100000); enablePowerAndRGBC(); }
--- a/TCS3472_I2C.h Fri Mar 21 17:38:11 2014 +0000 +++ b/TCS3472_I2C.h Wed Apr 16 10:57:46 2014 +0000 @@ -57,7 +57,7 @@ int setHighInterruptThreshold( const int threshold ); int readInterruptPersistence(); int setInterruptPersistence( const int persistence ); // persistence must be 0, 1, 2, 3, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55 or 60 - int clearInterrupt(); + int clearInterrupt(); // writes 0b11100110 to command register to clear interrupt int readRGBCGain(); int setRGBCGain( const int gain ); // gain must be 1, 4, 16 or 60 char getDeviceID();