M Seiser
/
Bertl_neu_LEd
LED_Programm
Revision 0:c4795d964769, committed 2015-04-16
- Comitter:
- mSeiser
- Date:
- Thu Apr 16 11:48:29 2015 +0000
- Commit message:
- LED_BLINKER;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/If_Task.cpp Thu Apr 16 11:48:29 2015 +0000 @@ -0,0 +1,21 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "If_Task.h" + + +void GamePlayer::CaptureTheBeeper() +{ + Move(); + if(NextToABeeper()) + { + PickBeeper(); + TurnAround(); + } + Move(); +} +void GamePlayer :: TurnAround() +{ + TurnLeft(); + TurnLeft(); + +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/If_Task.h Thu Apr 16 11:48:29 2015 +0000 @@ -0,0 +1,14 @@ +#include "mbed.h" +#include "ur_Bertl.h" + + +#ifndef GAMEPLAYER_H +#define GAMEPLAYER_H + +class GamePlayer : public ur_Bertl +{ + public: + void CaptureTheBeeper(); + void TurnAround(); +}; +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Apr 16 11:48:29 2015 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "If_Task.h" +#include "const.h" + + + + +int main() +{ + GamePlayer robot; + + robot.WaitUntilButtonPressed(); + robot.CaptureTheBeeper(); + robot.BlueLedsON(); + robot.MoveBackwards(); + robot.BlueLedsOFF(); + robot.NibbleLeds(0x0A); + robot.NibbleLeds(0x0F); + robot.NibbleLeds(0x01); + robot.ShutOff(); +}; \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Apr 16 11:48:29 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ur_Bertl.lib Thu Apr 16 11:48:29 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/BERTL_CHEL_18/code/ur_Bertl/#e7f74f072564