![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
while_Bertl Funktionen mit Task1,3
Fork of while_Bertl123 by
Diff: NewClass.cpp
- Revision:
- 2:c2551ea9238b
- Parent:
- 1:b6d7de0d8613
--- 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); + } + + +} +