yoshikawa kyoto

Dependencies:   S11059-SoftI2C VL6180 m3pi mbed

Fork of VL6180_Hello_World by Steven Burg

Committer:
sburg
Date:
Mon Oct 19 16:47:41 2015 +0000
Revision:
0:2508f38e90fe
Child:
1:6340d62d759f
First commit of main program

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sburg 0:2508f38e90fe 1 #include "VL6180.h"
sburg 0:2508f38e90fe 2 #include "mbed.h"
sburg 0:2508f38e90fe 3
sburg 0:2508f38e90fe 4 VL6180 rf(p9, p10); //I2C sda and scl
sburg 0:2508f38e90fe 5 Serial pc(USBTX, USBRX); //USB serial
sburg 0:2508f38e90fe 6
sburg 0:2508f38e90fe 7 int main() {
sburg 0:2508f38e90fe 8 float reading;
sburg 0:2508f38e90fe 9 while(1) {
sburg 0:2508f38e90fe 10 reading = rf;
sburg 0:2508f38e90fe 11 pc.printf("Read %4.1f cm\n", reading);
sburg 0:2508f38e90fe 12 wait(0.5);
sburg 0:2508f38e90fe 13 }
sburg 0:2508f38e90fe 14 }