Ändert die Libary

Dependencies:   Bertl mbed

Revision:
0:7b05b8ab7d3a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Dec 21 14:30:12 2015 +0000
@@ -0,0 +1,118 @@
+#include "mbed.h"
+#include "Robot.h"
+#include "const.h"
+
+Robot bertl;
+
+
+    void Blinkenl()
+    {
+        int a=0;
+        while(a<3)
+        {
+            bertl.TurnLedOn(LED_FL2);
+            bertl.TurnLedOn(LED_BL2);
+            wait(1);
+            bertl.TurnLedOff(LED_FL2);
+            bertl.TurnLedOff(LED_BL2);
+            wait(1);
+            a++;
+        }   
+    }
+    void Blinkenr()
+    {
+        int a=0;
+        while(a<3)
+        {
+            bertl.TurnLedOn(LED_FR2);
+            bertl.TurnLedOn(LED_BR2);
+            wait(1);
+            bertl.TurnLedOff(LED_FR2);
+            bertl.TurnLedOff(LED_BR2);
+            wait(1);
+            a++;
+        }            
+    }
+    void bremslichter()
+    {
+         bertl.TurnLedOn(LED_BR1&LED_BL1);
+         wait(1);   
+         bertl.TurnLedOff(LED_BR1&LED_BL1);  
+    }
+    void Bunt(bool rot,bool blau,bool grun)
+    {
+        bertl.RGBLed(rot,blau,grun);    
+    }
+    
+    void Fahren()
+    {
+       bertl.Move(); 
+    }
+    
+    void Rechts()
+    {
+        bertl.TurnLeft();    
+    }
+    
+    void VierRoteLed(int count)
+    {
+            bertl.NibbleLeds(count);
+    }
+    void LedAn(int16_t led)
+    {
+        bertl.TurnLedOn(led);    
+    }
+    void LedAus(int16_t led)
+    {
+        bertl.TurnLedOff(led);    
+    }
+    void LedBlauAn()
+    {
+        bertl.BlueLedsON();    
+    }
+    void LedBlauAus()
+    {
+        bertl.BlueLedsOFF();    
+    }
+    bool WartenBisKnopfGedruckt()
+    {
+        return bertl.WaitUntilButtonPressed();   
+    }
+    bool VorneFrei()
+    {
+        return bertl.FrontIsClear();    
+    }
+    bool NebenEinenPieper()
+    {
+        return bertl.NextToABeeper();
+    }
+    bool KnopfGedruckt(const int a)
+    {
+        return bertl.IsButtonPressed(a);    
+    }
+    int GedruckterKnopfZuruck()
+    {
+        return bertl.ReturnButtonPressed();    
+    }
+    
+    
+int main()
+{
+    Bunt(true,false,true);
+    Blinkenl();
+    Blinkenr();
+    bremslichter();
+    Fahren();
+    Rechts();
+    VierRoteLed(3);
+    LedAn(LED_BR2);
+    LedAus(LED_BR2);   
+    LedBlauAn();
+    LedBlauAus();
+    WartenBisKnopfGedruckt();
+    VorneFrei();
+    NebenEinenPieper();
+    KnopfGedruckt(BTN_BR);
+    GedruckterKnopfZuruck();    
+}
+