Lukas Feldgrill
/
task_Bertl
Alle Beeper werden zur Wand gebracht
Revision 0:78cdcb8ca467, committed 2015-04-24
- Comitter:
- feldgrill1
- Date:
- Fri Apr 24 07:47:12 2015 +0000
- Commit message:
- Alle Beeper zur Wand bringen
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Bertl_Bewegungen.cpp Fri Apr 24 07:47:12 2015 +0000 @@ -0,0 +1,34 @@ +#include "Bertl_Bewegungen.h" + +void Bertl_Bewegungen :: TurnRight () +{ + TurnLeft(); + TurnLeft(); + TurnLeft(); +} + +void Bertl_Bewegungen :: TurnAround () +{ + TurnLeft(); + TurnLeft(); +} + +void Bertl_Bewegungen :: Move3Boxes () +{ + Move(); + Move(); + Move(); +} + +void Bertl_Bewegungen :: Move2Boxes() // Methodendefinition +{ + Move(); + Move(); +} + +void Bertl_Bewegungen :: Move4Boxes() // Methodendefinition +{ + Move2Boxes(); + Move2Boxes(); +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Bertl_Bewegungen.h Fri Apr 24 07:47:12 2015 +0000 @@ -0,0 +1,14 @@ +#include "ur_Bertl.h" + +#ifndef BERTL_BEWEGUNGEN_H +#define BERTL_BEWEGUNGEN_H +class Bertl_Bewegungen : public ur_Bertl +{ +public: + void TurnRight (); + void TurnAround (); + void Move3Boxes (); + void Move2Boxes(); // Methodenprototyping + void Move4Boxes(); +}; +#endif \ No newline at end of file
--- /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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Apr 24 07:47:12 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9ad691361fac \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ur_Bertl.lib Fri Apr 24 07:47:12 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/BERTL_CHEL_18/code/ur_Bertl/#07e55b300ff1