TSL2561(照度センサ)のライブラリです
Dependents: HYBRYD2018_IZU_ROCKET Hybrid_IZU2019
Diff: TSL2561.cpp
- Revision:
- 2:276a177de00b
- Parent:
- 1:4e7b35c8d948
- Child:
- 3:f62d7ea19cbb
diff -r 4e7b35c8d948 -r 276a177de00b TSL2561.cpp --- a/TSL2561.cpp Wed May 02 18:17:28 2018 +0000 +++ b/TSL2561.cpp Wed Nov 14 09:13:55 2018 +0000 @@ -1,7 +1,7 @@ #include "mbed.h" #include "TSL2561.h" -Serial DEBUG(USBTX,USBRX); +//Serial DEBUG(USBTX,USBRX); myTSL2561::myTSL2561(I2C &i2cBus,AD0 celect) { @@ -36,7 +36,7 @@ i2c->write(SLV_WRITE_TSL, &check_cmd, 1); i2c->read(SLV_READ_TSL, &check_read, 1); - DEBUG.printf("CHECK_REG read = %x\r\n",check_read); + //DEBUG.printf("CHECK_REG read = %x\r\n",check_read); if(check_read == ID_NUMBER){ return 1;} else{ return 0;} @@ -47,7 +47,7 @@ read_cmd = COMMAND | RAW_DATA_LOW; i2c->write(SLV_WRITE_TSL, &read_cmd, 1); - wait_ms(wait_time); + //wait_ms(wait_time); i2c->read(SLV_READ_TSL, buff, 2); val[0] = (int)buff[0];