![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Hello world program for the VL6180
Revision 0:2508f38e90fe, committed 2015-10-19
- Comitter:
- sburg
- Date:
- Mon Oct 19 16:47:41 2015 +0000
- Commit message:
- First commit of main program
Changed in this revision
diff -r 000000000000 -r 2508f38e90fe VL6180.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VL6180.lib Mon Oct 19 16:47:41 2015 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/sburg/code/VL6180/#595673e4c505
diff -r 000000000000 -r 2508f38e90fe main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Oct 19 16:47:41 2015 +0000 @@ -0,0 +1,14 @@ +#include "VL6180.h" +#include "mbed.h" + +VL6180 rf(p9, p10); //I2C sda and scl +Serial pc(USBTX, USBRX); //USB serial + +int main() { + float reading; + while(1) { + reading = rf; + pc.printf("Read %4.1f cm\n", reading); + wait(0.5); + } +} \ No newline at end of file
diff -r 000000000000 -r 2508f38e90fe mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Oct 19 16:47:41 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68 \ No newline at end of file