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: S11059-SoftI2C VL6180 m3pi mbed
Fork of VL6180_Hello_World by
Diff: main.cpp
- Revision:
- 0:2508f38e90fe
- Child:
- 1:6340d62d759f
--- /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
