Task 3

Dependencies:   mbed

Fork of Liniensensor_2 by Dominik Weiss

Mein Projekt:

Dieses Projekt habe ich im SS 2015 in FSST programmiert 3. While Task

main.cpp

Committer:
Dominik32
Date:
2015-04-24
Revision:
4:d69d779e204b
Parent:
3:8587d08d9f65

File content as of revision 4:d69d779e204b:

#include "mbed.h"
#include "ur_Bertl.h"
#include "const.h"
#include "Alle_Befehle.h"






int main()
{
    Alle_Befehle karel;
    int x =0;
    
    
    while(1)
    {
        
        while(!karel.NextToABeeper() && karel.FrontIsClear())
        {
            karel.Move();        
        }
        
        karel.TurnLeft();
        
        while(karel.NextToABeeper() && karel.FrontIsClear())
        {
            karel.PickBeeper();
            karel.Move();
            x++;        
        }
        
        karel.TurnAround();
        
        while(x>0)
        {
            karel.Move();
            x--;
        }
        karel.TurnLeft();
        karel.Move();
        
    }
        

        
    
    
}