Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- 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