test

Dependencies:   S11059 VL6180X m3pi mbed

Fork of tc_agent by Ichiro Maruta

main.cpp

Committer:
sburg
Date:
2015-10-19
Revision:
0:2508f38e90fe
Child:
1:6340d62d759f

File content as of revision 0:2508f38e90fe:

#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);
    }
}