Lukas Feldgrill
/
task_Bertl
Alle Beeper werden zur Wand gebracht
Diff: main.cpp
- Revision:
- 0:78cdcb8ca467
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Apr 24 07:47:12 2015 +0000 @@ -0,0 +1,42 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "const.h" +#include "Bertl_Bewegungen.h" + +class task_Bertl : public ur_Bertl +{ + public: + void TurnRight(){ + TurnLeft(); TurnLeft(); TurnLeft();} + void Move2Boxes(){ + Move();Move();} + }; + +int main() +{ + //ur_Bertl karel; + // Bertl_Bewegungen karel; // Objekt erzeugen (instatiieren) + + // while(karel.WaitUntilButtonPressed()){} + + // karel.Move4Boxes(); + // karel.TurnLeft(); + // karel.Move2Boxes(); + // karel.TurnLeft(); + // karel.Move4Boxes(); + // karel.ShutOff(); + + task_Bertl karel; + + karel.Move2Boxes(); + karel.PickBeeper(); + karel.TurnRight(); + karel.Move2Boxes(); + karel.PickBeeper(); + karel.TurnRight(); + karel.Move(); + karel.TurnLeft(); + karel.Move2Boxes(); + karel.ShutOff(); + +} \ No newline at end of file