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
00001 #include "mbed.h" 00002 #include "MSS.h" 00003 #include "vt100.h" 00004 #include "VEML6030.h" 00005 00006 #ifndef MSU_VEML6030_I2C_ADDRESS 00007 #define MSU_VEML6030_I2C_ADDRESS 0x10 00008 #endif 00009 00010 VEML6030 *veml6030 = 0 ; 00011 00012 vt100 *tty = 0 ; 00013 00014 int main(void) 00015 { 00016 uint16_t als, white ; 00017 00018 veml6030 = new VEML6030(PIN_SDA, PIN_SCL, MSU_VEML6030_I2C_ADDRESS) ; 00019 veml6030->setALSConf(0x0000) ; 00020 veml6030->setPowerSaving(0x0000) ; 00021 00022 tty = new vt100() ; 00023 tty->cls() ; 00024 00025 printf("=== VEML6030 test for %s (%s)===\n", BOARD_NAME, __DATE__) ; 00026 printf("Ambient, White\n") ; 00027 00028 while(1) { 00029 als = veml6030->getALS() ; 00030 white = veml6030->getWHITE() ; 00031 printf("%6d, %6d\n", als, white) ; 00032 wait(1) ; 00033 } 00034 }
Generated on Fri Jul 15 2022 20:56:40 by
1.7.2