ok

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
stueckler
Date:
Fri Jun 19 11:31:04 2015 +0000
Commit message:
ok

Changed in this revision

drive.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 e39ffc2e7160 drive.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/drive.lib	Fri Jun 19 11:31:04 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/BULME_BHEL18/code/drive/#e09765d7c33a
diff -r 000000000000 -r e39ffc2e7160 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jun 19 11:31:04 2015 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+#include "drive.h"
+
+// Drive03: Bis zur Linie vorfahren und warten
+// solange er auf der Linie ist.
+ 
+BusIn  sensor(p18,p16,p19,p17);
+int speed = 150;
+
+void Links()
+{
+    MotR(speed);
+    wait(0.5);
+    BrakeMotR();
+}
+void Rechts()
+{
+    MotL(speed);
+    while (sensor ==0); // Warten bis Linie getroffen
+    BrakeMotL();
+}
+int main() {
+    MotInit();    
+    while(1)                //Endlosschleife
+    {
+           Links();         //ca. 90 Grad wegdrehen
+           Rechts();        //bis zur Linie zurückdrehen
+    }
+}
+// Drive05: An Linie entlangfahren mit einem Sensor (Linie zu breit für mehr)
+// - ca. 90 Grad wegdrehen
+// - bis zur Linie zurückdrehen
+// - Vorgänge wiederholen
+
+
diff -r 000000000000 -r e39ffc2e7160 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jun 19 11:31:04 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/cbbeb26dbd92
\ No newline at end of file