si1145 library
Dependents: FRDM_ApplicationShield_GroveSensors
Revision 10:ba32b0098ee8, committed 2016-07-03
- Comitter:
- brdarji
- Date:
- Sun Jul 03 08:01:08 2016 +0000
- Parent:
- 9:daf5ed7c7c3e
- Commit message:
- si1145 library
Changed in this revision
SI1145.cpp | Show annotated file Show diff for this revision Revisions of this file |
SI1145.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r daf5ed7c7c3e -r ba32b0098ee8 SI1145.cpp --- a/SI1145.cpp Mon Jan 18 22:06:40 2016 +0000 +++ b/SI1145.cpp Sun Jul 03 08:01:08 2016 +0000 @@ -1,10 +1,3 @@ -/** - * SI1145 Digital UV Index / IR / Visible Light Sensor library - * @author N Good - * @date 5-May-2015 - * Library for "SI1145 Digital UV Index / IR / Visible Light Sensor" from adafruit - * https://www.adafruit.com/products/1777 - */ #include "mbed.h" #include "SI1145.h" @@ -29,12 +22,6 @@ initalize(); } -//SI1145::~SI1145() -//{ -// if (NULL != i2c_p) -// delete i2c_p; -//} - void SI1145::initalize(void) { uint16_t idu; //i2c.frequency(100000); @@ -72,12 +59,12 @@ char COMMAND[2] = {0x18,0x01}; i2c.write(address,COMMAND,2); // wait - wait(100/1000); + wait_ms(10); //write HWKEY char HWKEY[2] = {0x07, 0x17}; i2c.write(address,HWKEY,2); // wait - wait(100/1000); + wait_ms(10); //__________________________________________________________ // enable UVindex measurement coefficients! char REG_UCOEFF0[2] = {0x13,0x29};
diff -r daf5ed7c7c3e -r ba32b0098ee8 SI1145.h --- a/SI1145.h Mon Jan 18 22:06:40 2016 +0000 +++ b/SI1145.h Sun Jul 03 08:01:08 2016 +0000 @@ -1,10 +1,3 @@ -/** - * SI1145 Digital UV Index / IR / Visible Light Sensor library - * @author N Good - * @date 5-May-2015 - * Library for "SI1145 Digital UV Index / IR / Visible Light Sensor" from adafruit - * https://www.adafruit.com/products/1777 - */ #include "mbed.h" #define SI1145_ADDRESS (0x60 << 1)