Julian Roll
/
while_BertlTask1und3
while_Bertl Funktionen mit Task1,3
Fork of while_Bertl123 by
Revision 2:c2551ea9238b, committed 2015-04-24
- Comitter:
- Pouter123
- Date:
- Fri Apr 24 09:17:24 2015 +0000
- Parent:
- 1:b6d7de0d8613
- Commit message:
- while_Bertl Tasks
Changed in this revision
--- a/NewClass.cpp Fri Apr 24 08:13:05 2015 +0000 +++ b/NewClass.cpp Fri Apr 24 09:17:24 2015 +0000 @@ -1,7 +1,6 @@ #include "mbed.h" #include "NewClass.h" #include "ur_Bertl.h" -#include "config.h" #include "const.h" @@ -37,13 +36,11 @@ Move(); if((NextToABeeper())&&(x==0)) { - PickBeeper(); TurnLeft(); x++; } else if(NextToABeeper()) { - PickBeeper(); x++; } else @@ -58,4 +55,35 @@ x = 0; } } -} \ No newline at end of file +} + +void NewClass :: Task1() +{ + TurnLedOff(LED_ALL); + while(1) + { + while(IsButtonPressed(BTN_FLL)) + { + TurnLedOn(LED_FL1); + } + TurnLedOff(LED_ALL); + while(IsButtonPressed(BTN_FRR)) + { + TurnLedOn(LED_FR1); + } + TurnLedOff(LED_ALL); + while(IsButtonPressed(BTN_BL)) + { + TurnLedOn(LED_BL1); + } + TurnLedOff(LED_ALL); + while(IsButtonPressed(BTN_BR)) + { + TurnLedOn(LED_BR1); + } + TurnLedOff(LED_ALL); + } + + +} +
--- a/NewClass.h Fri Apr 24 08:13:05 2015 +0000 +++ b/NewClass.h Fri Apr 24 09:17:24 2015 +0000 @@ -1,7 +1,7 @@ #include "mbed.h" #include "ur_Bertl.h" #include "const.h" -#include "config.h" + #ifndef NEWCLASS #define NEWCLASS @@ -12,6 +12,8 @@ void ClearAllBeepersToTheWall(); void MoveUntilPickBeeper(); void Task3(); + void Task1(); + void Task12(); };
--- a/main.cpp Fri Apr 24 08:13:05 2015 +0000 +++ b/main.cpp Fri Apr 24 09:17:24 2015 +0000 @@ -2,14 +2,14 @@ #include "ur_Bertl.h" #include "NewClass.h" #include "const.h" -#include "config.h" + int main() { NewClass karel; - + karel.ShutOff(); } \ No newline at end of file