MSS
/
testVEML7700
test program for VEML7700
main.cpp
- Committer:
- Rhyme
- Date:
- 2017-03-30
- Revision:
- 0:bf177d3fef4e
- Child:
- 1:9d2c3ffc80cf
File content as of revision 0:bf177d3fef4e:
#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(0x00) ; veml7700->setPowerSaving(0x00) ; tty = new vt100() ; tty->cls() ; printf("=== VEML7700 test %s ===\n", __DATE__) ; while(1) { als = veml7700->getALS() ; white = veml7700->getWHITE() ; printf("VEML7700 ALS: %d WHITE: %d\n", als, white) ; wait(1) ; } }