Ultraschall funktioniert

Dependencies:   SRF08 mbed

Files at this revision

API Documentation at this revision

Comitter:
rgiesecke
Date:
Tue Jan 17 15:33:28 2017 +0000
Commit message:
Ultraschall funktioniert

Changed in this revision

SRF08.lib Show annotated file Show diff for this revision Revisions of this file
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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SRF08.lib	Tue Jan 17 15:33:28 2017 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/brentdekker/code/SRF08/#a11bd4ea3c18
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Jan 17 15:33:28 2017 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+#include "SRF08.h"
+
+SRF08 Uschall(p9,p10,0xE4);
+int Entfernung = 0;
+
+
+int main() {
+    while(1) {
+        Uschall.startRanging();
+        while (Uschall.rangingFinished() == 0) {
+            }
+        Entfernung = Uschall.getRange();
+        printf("Entfernung: %d\n\r ", Entfernung);
+    }  
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Jan 17 15:33:28 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34
\ No newline at end of file