Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: VEML6030 mbed vt100
main.cpp
- Committer:
- Rhyme
- Date:
- 2017-03-30
- Revision:
- 1:31b0d73cfaf4
- Parent:
- 0:1f65c238e7e6
- Child:
- 2:e284a78127b7
File content as of revision 1:31b0d73cfaf4:
#include "mbed.h" #include "MSS.h" #include "vt100.h" #include "VEML6030.h" #ifndef MSU_VEML6030_I2C_ADDRESS #define MSU_VEML6030_I2C_ADDRESS 0x10 #endif VEML6030 *veml6030 = 0 ; vt100 *tty = 0 ; int main(void) { uint16_t als, white ; veml6030 = new VEML6030(PIN_SDA, PIN_SCL, MSU_VEML6030_I2C_ADDRESS) ; veml6030->setALSConf(0x0000) ; veml6030->setPowerSaving(0x0000) ; tty = new vt100() ; tty->cls() ; printf("=== VEML6030 test %s ===\n", __DATE__) ; while(1) { als = veml6030->getALS() ; white = veml6030->getWHITE() ; printf("VEML6030 ALS: %d WHITE: %d\n", als, white) ; wait(1) ; } }