MSS
/
testVEML7700
test program for VEML7700
main.cpp
- Committer:
- Rhyme
- Date:
- 2017-04-28
- Revision:
- 1:9d2c3ffc80cf
- Parent:
- 0:bf177d3fef4e
- Child:
- 4:fd986c9c7c93
File content as of revision 1:9d2c3ffc80cf:
#include "mbed.h" #include "MSS.h" #include "vt100.h" #include "VEML7700.h" #ifndef MSU_VEML7700_I2C_ADDRESS #define MSU_VEML7700_I2C_ADDRESS 0x10 #endif VEML7700 *veml7700 = 0 ; vt100 *tty = 0 ; int main(void) { uint16_t als, white ; veml7700 = new VEML7700(PIN_SDA, PIN_SCL, MSU_VEML7700_I2C_ADDRESS) ; veml7700->setALSConf(0x0000) ; veml7700->setPowerSaving(0x0000) ; tty = new vt100() ; tty->cls() ; printf("=== VEML7700 test for %s (%s) ===\n",BOARD_NAME, __DATE__) ; printf(" ALS, White\n") ; while(1) { als = veml7700->getALS() ; white = veml7700->getWHITE() ; printf("%6d, %6d\n", als, white) ; wait(2) ; } }