without input
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:86ccaaf3dc4a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Jun 09 10:23:42 2016 +0000 @@ -0,0 +1,14 @@ +#include "mbed.h" +AnalogIn ranger(p15); + + int main() { + + float r; + float d; + while(1) { + r = ranger; + d = r / 0.00084; + printf("Range: %.3f \n\r", d); + wait(1.0); + } + } \ No newline at end of file