jiang wang
/
SRF08HelloWorld
yuiyui
Fork of SRF08HelloWorld by
Diff: main.cpp
- Revision:
- 0:b757a3e4f64e
- Child:
- 1:1228beb2d7fe
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jul 17 12:50:51 2013 +0000 @@ -0,0 +1,13 @@ +#include "mbed.h" +#include "SRF08.h" + +SRF08 srf08(p9, p10, 0xE0); // Define SDA, SCL pin and I2C address + +int main() { + + while (1) { + printf("Measured range : %.2f cm\n",srf08.read()); + wait(0.1); + } + +}