MSS / Mbed 2 deprecated testVEML7700

Dependencies:   VEML7700 mbed

Revision:
0:bf177d3fef4e
Child:
1:9d2c3ffc80cf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Mar 30 04:24:48 2017 +0000
@@ -0,0 +1,34 @@
+#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) ;
+    }
+}
\ No newline at end of file