Alle Beeper werden zur Wand gebracht

Dependencies:   mbed

Committer:
feldgrill1
Date:
Fri Apr 24 07:47:12 2015 +0000
Revision:
0:78cdcb8ca467
Alle Beeper zur Wand bringen

Who changed what in which revision?

UserRevisionLine numberNew contents of line
feldgrill1 0:78cdcb8ca467 1 #include "mbed.h"
feldgrill1 0:78cdcb8ca467 2 #include "ur_Bertl.h"
feldgrill1 0:78cdcb8ca467 3 #include "const.h"
feldgrill1 0:78cdcb8ca467 4 #include "Bertl_Bewegungen.h"
feldgrill1 0:78cdcb8ca467 5
feldgrill1 0:78cdcb8ca467 6 class task_Bertl : public ur_Bertl
feldgrill1 0:78cdcb8ca467 7 {
feldgrill1 0:78cdcb8ca467 8 public:
feldgrill1 0:78cdcb8ca467 9 void TurnRight(){
feldgrill1 0:78cdcb8ca467 10 TurnLeft(); TurnLeft(); TurnLeft();}
feldgrill1 0:78cdcb8ca467 11 void Move2Boxes(){
feldgrill1 0:78cdcb8ca467 12 Move();Move();}
feldgrill1 0:78cdcb8ca467 13 };
feldgrill1 0:78cdcb8ca467 14
feldgrill1 0:78cdcb8ca467 15 int main()
feldgrill1 0:78cdcb8ca467 16 {
feldgrill1 0:78cdcb8ca467 17 //ur_Bertl karel;
feldgrill1 0:78cdcb8ca467 18 // Bertl_Bewegungen karel; // Objekt erzeugen (instatiieren)
feldgrill1 0:78cdcb8ca467 19
feldgrill1 0:78cdcb8ca467 20 // while(karel.WaitUntilButtonPressed()){}
feldgrill1 0:78cdcb8ca467 21
feldgrill1 0:78cdcb8ca467 22 // karel.Move4Boxes();
feldgrill1 0:78cdcb8ca467 23 // karel.TurnLeft();
feldgrill1 0:78cdcb8ca467 24 // karel.Move2Boxes();
feldgrill1 0:78cdcb8ca467 25 // karel.TurnLeft();
feldgrill1 0:78cdcb8ca467 26 // karel.Move4Boxes();
feldgrill1 0:78cdcb8ca467 27 // karel.ShutOff();
feldgrill1 0:78cdcb8ca467 28
feldgrill1 0:78cdcb8ca467 29 task_Bertl karel;
feldgrill1 0:78cdcb8ca467 30
feldgrill1 0:78cdcb8ca467 31 karel.Move2Boxes();
feldgrill1 0:78cdcb8ca467 32 karel.PickBeeper();
feldgrill1 0:78cdcb8ca467 33 karel.TurnRight();
feldgrill1 0:78cdcb8ca467 34 karel.Move2Boxes();
feldgrill1 0:78cdcb8ca467 35 karel.PickBeeper();
feldgrill1 0:78cdcb8ca467 36 karel.TurnRight();
feldgrill1 0:78cdcb8ca467 37 karel.Move();
feldgrill1 0:78cdcb8ca467 38 karel.TurnLeft();
feldgrill1 0:78cdcb8ca467 39 karel.Move2Boxes();
feldgrill1 0:78cdcb8ca467 40 karel.ShutOff();
feldgrill1 0:78cdcb8ca467 41
feldgrill1 0:78cdcb8ca467 42 }