Clear All Beeper To The Wall

Dependencies:   mbed ur_Bertl

Revision:
2:9795f864acac
Parent:
1:fe621d794c6c
--- a/uebungen.cpp	Fri Apr 24 09:17:13 2015 +0000
+++ b/uebungen.cpp	Thu May 07 12:24:26 2015 +0000
@@ -21,62 +21,58 @@
     srand(time(0));
     
     int b = 0;
+    BlueLedsOFF();
+    TurnLedOff(LED_ALL);
+    //RGBLedOFF();
+     
     
     while(1) 
     {
-        //if(!IsButtonPressed(BTN_FM)) 
-        //{
-            NibbleLeds(0xF8);
-            wait(1);
-            NibbleLeds(0xFE);
-            wait(1);
-            NibbleLeds(0xF1);
-            //wait(1);
+        NibbleLeds(0xF8);
+        wait(1);
+        NibbleLeds(0xFE);
+        wait(1);
+        NibbleLeds(0xF1);
 
-            if (b == 1)
-            {
-                wait(5);
-            }
+        if (b == 1)
+        {
+            wait(5);
+        }
 
-            int y = (rand() % 6) +5;
+        int y = (rand() % 6) +5;
             
-            if(b == 0)
+        if(b == 0)
+        {
+            for(int i = 0; i < y; i++) 
             {
-                for(int i = 0; i < y; i++) 
+                Move();
+                if (IsButtonPressed(BTN_FM))
                 {
-                    Move();
-                    if (IsButtonPressed(BTN_FM))
-                    {
-                        b = 1;
-                        ShutOff();
-                        break;
-                    }
+                    b = 1;
+                    TurnLedOn(LED_ALL_FRONT);
+                    break;
                 }
             }
-            
-            
+        }
             
-            //if(!IsButtonPressed(BTN_FM))
-            //{
-                for(int j = 0; j < 4; j++)
-                {
-                    NibbleLeds(0xF1);
-                    wait_ms(500);
-                    NibbleLeds(0xF0);
-                    wait_ms(500);
-                }
+        for(int j = 0; j < 4; j++)
+        {
+            NibbleLeds(0xF1);
+            wait_ms(500);
+            NibbleLeds(0xF0);
+            wait_ms(500);
+        }
                 
-                NibbleLeds(0xF6);
-                wait_ms(500);
-                NibbleLeds(0xF0);
-                wait_ms(500);
-                NibbleLeds(0xF8);
-            //}
-            //else
-            //{
-            //    ShutOff();
-            //    break;
-            //}
-        //}
+        NibbleLeds(0xF6);
+        wait_ms(500);
+        NibbleLeds(0xF0);
+        wait_ms(500);
+        NibbleLeds(0xF8);
+           
     }
+}
+
+void Task_Bertl :: LineFollow()
+{
+
 }
\ No newline at end of file