A test program for VCNL4020

Dependencies:   VCNL4020 mbed vt100

Files at this revision

API Documentation at this revision

Comitter:
Rhyme
Date:
Sat Apr 29 07:10:01 2017 +0000
Parent:
0:7502cb61069c
Commit message:
Format changed to be compatible with CSV

Changed in this revision

VCNL4020.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 7502cb61069c -r 0891311fabe5 VCNL4020.lib
--- a/VCNL4020.lib	Wed Mar 29 04:42:32 2017 +0000
+++ b/VCNL4020.lib	Sat Apr 29 07:10:01 2017 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/MSS/code/VCNL4020/#95952f8fe2b4
+https://developer.mbed.org/teams/MSS/code/VCNL4020/#4f4cdaf51fc2
diff -r 7502cb61069c -r 0891311fabe5 main.cpp
--- a/main.cpp	Wed Mar 29 04:42:32 2017 +0000
+++ b/main.cpp	Sat Apr 29 07:10:01 2017 +0000
@@ -27,6 +27,7 @@
     printf("Product ID = %d, Revision = %d\n", 
         vcnl4020->getProdID(),
         vcnl4020->getRevID()) ;
+    printf("Ambient Light, Proximity\n") ;
         
     while(1) {
         vcnl4020->trigBothOd() ; /* trigger both ALS and PROX */
@@ -38,7 +39,7 @@
             /* wait for proximate data ready */
         }
         prox = vcnl4020->getProx() ;
-        printf("VCNL4020 Ambient Light: %d  Proximity: %d\n", als, prox) ;
+        printf("%6d, %6d\n", als, prox) ;
         
         wait(1) ;
     }