TurnRight Übung - Fellegi
Revision 0:e5e0a4146553, committed 2015-05-08
- Comitter:
- kevinfellegi
- Date:
- Fri May 08 08:17:48 2015 +0000
- Commit message:
- TurnRight ?bung - Fellegi
Changed in this revision
diff -r 000000000000 -r e5e0a4146553 TurnRight.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TurnRight.cpp Fri May 08 08:17:48 2015 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "TurnRight.h" + + +void TurnRight_Bertl :: TurnRight() +{ + TurnLeft(); + TurnLeft(); + TurnLeft(); +} + +void TurnRight_Bertl :: TurnAround() +{ + TurnLeft(); + TurnLeft(); +} + +void TurnRight_Bertl :: Move4Boxes() +{ + Move(); + Move(); + Move(); + Move(); +} \ No newline at end of file
diff -r 000000000000 -r e5e0a4146553 TurnRight.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TurnRight.h Fri May 08 08:17:48 2015 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "const.h" + +#ifndef DE_BERTL_H +#define LED_BERTL_H + +class TurnRight_Bertl : public ur_Bertl +{ + public: + void TurnRight(); + void TurnAround(); + void Move4Boxes(); + }; + #endif \ No newline at end of file
diff -r 000000000000 -r e5e0a4146553 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri May 08 08:17:48 2015 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "TurnRight.h" + +int main() +{ + TurnRight_Bertl karel; + + karel.TurnAround(); + karel.Move4Boxes(); + karel.TurnLedOn(LED_FL1); + karel.TurnRight(); + karel.Move(); + karel.TurnRight(); + karel.Move4Boxes(); + karel.ShutOff(); +} \ No newline at end of file
diff -r 000000000000 -r e5e0a4146553 ur_Bertl.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ur_Bertl.lib Fri May 08 08:17:48 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/BERTL_CHEL_18/code/ur_Bertl/#ae04cb638b3c