Markus Ostermayer / Drive

Files at this revision

API Documentation at this revision

Comitter:
ZeronikHD
Date:
Fri May 29 12:03:11 2015 +0000
Parent:
0:6c2f448aaf0d
Commit message:
Vor und Zur?ck

Changed in this revision

drive.h Show annotated file Show diff for this revision Revisions of this file
move.cpp Show annotated file Show diff for this revision Revisions of this file
move.h Show annotated file Show diff for this revision Revisions of this file
diff -r 6c2f448aaf0d -r 04ff791ed585 drive.h
--- a/drive.h	Tue May 05 19:03:45 2015 +0000
+++ b/drive.h	Fri May 29 12:03:11 2015 +0000
@@ -1,7 +1,7 @@
 void MotInit();
 void BrakeMotL();
 void BrakeMotR();
-void MotL(int aPow);
-void MotR(int aPow);
+void MotL(int aPow);    //-255 - +255 geschwindigkeit
+void MotR(int aPow);    //-255 - +255 geschwindigkeit
 void MotSL(int aPow, int deg);
 void MotSR(int aPow, int deg);
diff -r 6c2f448aaf0d -r 04ff791ed585 move.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/move.cpp	Fri May 29 12:03:11 2015 +0000
@@ -0,0 +1,36 @@
+#include "drive.h"
+#include "mbed.h"
+
+void start()
+{
+    MotInit();    
+}
+
+void vor()
+{
+    MotL(200);
+    MotR(200);
+    wait(0.5);
+    BrakeMotL();
+    BrakeMotR();
+}
+void zurueck()
+{
+    MotL(-200);
+    MotR(-200);
+    wait(0.5);
+    BrakeMotL();
+    BrakeMotR();
+}
+void links()
+{
+    MotR(200);
+    wait(0.5);
+    BrakeMotR();
+}
+void rechts()
+{
+    MotL(200);
+    wait(0.5);
+    BrakeMotL();
+}
\ No newline at end of file
diff -r 6c2f448aaf0d -r 04ff791ed585 move.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/move.h	Fri May 29 12:03:11 2015 +0000
@@ -0,0 +1,5 @@
+void start();
+void vor();
+void zurueck();
+void links();
+void rechts();
\ No newline at end of file