Prüfung

Dependencies:   bertl14 mbed

Files at this revision

API Documentation at this revision

Comitter:
Nutria
Date:
Mon Jun 20 13:00:04 2016 +0000
Commit message:
Pr?fung

Changed in this revision

bertl14.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
diff -r 000000000000 -r b050d3fef5fb bertl14.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bertl14.lib	Mon Jun 20 13:00:04 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/Nutria/code/bertl14/#5162af5a63d4
diff -r 000000000000 -r b050d3fef5fb main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Jun 20 13:00:04 2016 +0000
@@ -0,0 +1,43 @@
+#include "mbed.h"
+#include "bertl14.h"
+// Lassen Sie ihn schräg starten
+unsigned taster; // Taster Variable
+DigitalOut led1(LED1);
+int main()
+{
+    bertl_PC9555_init();
+    while(1) {
+    
+        
+        taster = bertl_PC9555_switches(); // Ob Taster gedrückt sind
+
+        if (taster == TASTER_F) {         // Wenn eine vordere Taste gedrückt wurde bleibt er 1 sec. stehen
+            bertl_engine(0,0);
+            wait (1.0);
+        } else {
+                for (int i=0; i <6; i++)
+                {
+                
+                bertl_engine(100,100);
+                wait(0.3);
+                bertl_PC9555_leds(LED_F_ALL);
+                bertl_engine(0,100);        // Ausgleich da rechter Motor schwächer als links
+                wait(0.6);
+                bertl_PC9555_leds(LED_OFF);
+                bertl_engine(100,100);
+                wait(0.3);
+                bertl_PC9555_leds(LED_F_ALL);
+                bertl_engine(100,0);
+                wait(0.49);
+                bertl_PC9555_leds(LED_OFF);
+                }
+                bertl_engine(-100,100);     // Vorbereitung für Halbreis zum Ausgangspunkt
+                wait(0.4);
+                bertl_engine(60,100);       // Halbkreis
+                wait(12.0);                  
+                bertl_engine(-100,100);
+                wait(0.4);                  // in Startposition bringen
+            }
+        }
+    }
+
diff -r 000000000000 -r b050d3fef5fb mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Jun 20 13:00:04 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34
\ No newline at end of file