without input

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
sann5100
Date:
Thu Jun 09 10:23:42 2016 +0000
Commit message:
range detector

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 86ccaaf3dc4a main.cpp
--- /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
diff -r 000000000000 -r 86ccaaf3dc4a mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Jun 09 10:23:42 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34
\ No newline at end of file