EES Stephen Perse Sixth Form
/
SRF05_HelloWorld
works
Fork of SRF05_HelloWorld by
Diff: main.cpp
- Revision:
- 0:d87132986e8f
- Child:
- 1:612f5d9de345
diff -r 000000000000 -r d87132986e8f main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Nov 19 22:36:20 2010 +0000 @@ -0,0 +1,13 @@ +// Simple program to read the distance from an SRF05 using the SRF05 library + +#include "mbed.h" +#include "SRF05.h" + +SRF05 srf(p13, p14); + +int main() { + while(1) { + printf("Distance = %.1f\n", srf.read()); + wait(0.2); + } + } \ No newline at end of file