Matthew Else
/
SRF08HelloWorld
Code originally by Chris Styles (I think), published for the components section
Revision 0:b757a3e4f64e, committed 2013-07-17
- Comitter:
- melse
- Date:
- Wed Jul 17 12:50:51 2013 +0000
- Child:
- 1:1c6b0662e757
- Commit message:
- Initial Commit
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SRF08.lib Wed Jul 17 12:50:51 2013 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/chris/code/SRF08/#ba04e9cd48fc
--- /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); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jul 17 12:50:51 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17 \ No newline at end of file