Task

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
fritzhausmann
Date:
Thu Apr 23 12:08:46 2015 +0000
Commit message:
Task

Changed in this revision

NeueBefehle.cpp Show annotated file Show diff for this revision Revisions of this file
NeueBefehle.h 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
ur_Bertl.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r eec4aa8026ae NeueBefehle.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/NeueBefehle.cpp	Thu Apr 23 12:08:46 2015 +0000
@@ -0,0 +1,54 @@
+#include "NeueBefehle.h"
+#include "ur_Bertl.h"
+#include "mbed.h"
+#include "const.h"
+
+void NeueBefehle :: TurnRight()
+{
+    for(int a = 0; a < 3; a++)
+        TurnLeft();
+}
+
+void NeueBefehle :: TurnAround()
+{
+    for(int a = 0; a < 2; a++)
+        TurnLeft();
+}
+
+void NeueBefehle :: Move3Boxes()
+{
+    for(int a = 0; a < 3; a++)
+        Move();
+}
+
+void NeueBefehle :: Move4Boxes()
+{
+    for(int a = 0; a < 4; a++)
+        Move();
+}
+
+void NeueBefehle :: Move2Boxes()
+{
+    for(int a = 0; a < 2; a++)
+        Move();
+}
+
+void NeueBefehle :: TurnLeftBlink()
+{
+    for (int a = 0; a < 2; a++)
+    {
+        TurnLedOff(LED_ALL);
+        TurnLedOn(LED_FL2 | LED_BL1);
+        wait_ms(500);
+    }
+}
+
+void NeueBefehle :: TurnRightBlink()
+{
+    for (int a = 0; a < 2; a++)
+    {
+        TurnLedOff(LED_ALL);
+        TurnLedOn(LED_FR2 | LED_BR1);
+        wait_ms(500);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r eec4aa8026ae NeueBefehle.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/NeueBefehle.h	Thu Apr 23 12:08:46 2015 +0000
@@ -0,0 +1,15 @@
+#include "ur_Bertl.h"
+#include "mbed.h"
+#include "const.h"
+
+class NeueBefehle : public ur_Bertl
+{
+public:
+    void TurnRight();
+    void TurnAround();
+    void Move3Boxes();
+    void Move4Boxes();
+    void Move2Boxes();
+    void TurnLeftBlink();
+    void TurnRightBlink();
+};
\ No newline at end of file
diff -r 000000000000 -r eec4aa8026ae main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Apr 23 12:08:46 2015 +0000
@@ -0,0 +1,15 @@
+#include "ur_Bertl.h"
+#include "mbed.h"
+#include "const.h"
+#include "NeueBefehle.h"
+
+int main()
+{
+    NeueBefehle karel;
+    
+    while(karel.WaitUntilButtonPressed()){}
+    karel.TurnLeftBlink();
+    karel.Move();
+    while(karel.WaitUntilButtonPressed()){}
+    karel.TurnRightBlink();
+}
\ No newline at end of file
diff -r 000000000000 -r eec4aa8026ae mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Apr 23 12:08:46 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889
\ No newline at end of file
diff -r 000000000000 -r eec4aa8026ae ur_Bertl.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ur_Bertl.lib	Thu Apr 23 12:08:46 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/teams/BULME_BERTL_2CHEL/code/ur_Bertl/#66e9a0afcbd6