Bertl bleibt auf Beeper

Dependencies:   mbed ur_Bertl

Files at this revision

API Documentation at this revision

Comitter:
Pouter123
Date:
Thu Apr 30 12:50:04 2015 +0000
Commit message:
Bertl-Beeper

Changed in this revision

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Apr 30 12:50:04 2015 +0000
@@ -0,0 +1,40 @@
+#include "mbed.h"
+#include "ur_Bertl.h"
+#include "const.h"
+
+
+int main()
+{
+    Bertl karel;
+    
+    while(1)
+    {
+    karel.RGBLed(0,0,1);
+    uint8_t val = karel.GetLineValues();  
+    karel.NibbleLeds(val);
+    if(karel.NextToABeeper())
+        karel.Move();
+    while(!(karel.NextToABeeper()))
+        {
+        karel.RGBLed(1,0,0);
+        karel.TurnRigth();
+        if(karel.NextToABeeper())
+            {
+            karel.RGBLed(0,1,0);
+            wait_ms(500);
+            }
+        }
+        
+    }
+ // karel.Move();
+    
+ /* karel.RGBLed(1,0,0);    // red
+    wait_ms(500);
+    karel.RGBLed(0,1,0);    // green
+    wait_ms(500);
+    karel.RGBLed(0,0,1);    // blue
+    wait_ms(500); */   
+    
+    
+    
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Apr 30 12:50:04 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8ab26030e058
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ur_Bertl.lib	Thu Apr 30 12:50:04 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/BERTL_CHEL_18/code/ur_Bertl/#3ce84646fd74