mbedbidos / Mbed 2 deprecated ultrasonido_2

Dependencies:   mbed

Revision:
1:a656f3ed73e5
Parent:
0:c9881f6aef19
--- a/main.cpp	Tue Nov 13 05:44:18 2018 +0000
+++ b/main.cpp	Mon Nov 19 02:02:10 2018 +0000
@@ -1,4 +1,3 @@
-
 #include "mbed.h"
  
 DigitalOut trigger(PC_12);
@@ -11,6 +10,8 @@
  
 int main()
 {
+    while(1)
+    {
     sonar.reset();
 // measure actual software polling timer delays
 // delay used later in time correction
@@ -50,5 +51,6 @@
         printf(" %d cm \n\r",distance);
 //wait so that any echo(s) return before sending another ping
         wait(0.2);
+        }
     }
 }
\ No newline at end of file