Versuch 1

Dependencies:   mbed

Fork of Beeper_Test by Dominik Weiss

Files at this revision

API Documentation at this revision

Comitter:
Dominik32
Date:
Thu Apr 23 12:33:34 2015 +0000
Parent:
1:5bcd7fd92f60
Commit message:
Liniensensor Versuch 1

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 5bcd7fd92f60 -r 0e1b409ff333 main.cpp
--- a/main.cpp	Thu Apr 23 12:12:01 2015 +0000
+++ b/main.cpp	Thu Apr 23 12:33:34 2015 +0000
@@ -7,50 +7,26 @@
 
 
 
-/*
-int main()
-{
-    ur_Bertl karel;
-    while( !karel.NextToABeeper() )
-    {
-        karel.Move();
-    }
-    karel.PickBeeper();
-    
-}
-
-*/
-
-
-
 
 int main()
 {
     ur_Bertl karel;
-    int z = 0;
     
-    while(1) 
+    while(1)
     {
-        if(karel.NextToABeeper()) 
-        {
-            z = z++;
-            if(z == 1) 
-            {
-                karel.RGBLed(1,0,0);
-            }
-            
-            else if(z == 2) 
-            {
-                karel.RGBLed(0,1,0);
-            }
-            
-            else if(z > 2) 
-            {
-                karel.RGBLed(0,0,1);
-            }
-            
+        while(karel.NextToABeeper())
+        {       
+            karel.Move();
         }
-        karel.Move();
+        karel.MoveBackwards();
+        karel.TurnLeft();
+        
+    }
+    
+}
 
-    }
-}
\ No newline at end of file
+
+
+
+
+