Philipp Maier
/
BERTL_Crash
Funktionen
Revision 0:b2556c73a145, committed 2015-12-21
- Comitter:
- Phil_1409
- Date:
- Mon Dec 21 14:37:10 2015 +0000
- Commit message:
- Funktionen
Changed in this revision
diff -r 000000000000 -r b2556c73a145 Bertl.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Bertl.lib Mon Dec 21 14:37:10 2015 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/Phil_1409/code/Bertl/#9b1d77f3ab2b
diff -r 000000000000 -r b2556c73a145 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Dec 21 14:37:10 2015 +0000 @@ -0,0 +1,111 @@ +#include "mbed.h" +#include "Robot.h" +#include "ur_Bertl.h" + +Robot bertl; + +void TurnRight() +{ + bertl.TurnRigth(); +} + +void TurnLeft() +{ + bertl.TurnLeft(); +} + +void Move() +{ + bertl.Move(); +} + +void MoveBack() +{ + bertl.MoveBackwards(); +} + +bool FrontIsClear() +{ + if(bertl.frontIsClear()) + return true; + else + return false; +} + +void AllFrontLedOn() +{ + bertl.TurnLedOn(LED_ALL_FRONT); +} + +void AllFrontLedOff() +{ + bertl.TurnLedOff(LED_ALL_FRONT); +} + +void AllBackLedOn() +{ + bertl.TurnLedOn(LED_ALL_BACK); +} + +void AllBackLedOff() +{ + bertl.TurnLedOff(LED_ALL_BACK); +} + +void AllLedOn() +{ + bertl.TurnLedOn(LED_ALL); +} + +void AllLedOff() +{ + bertl.TurnLedOff(LED_ALL); +} + +void AlertLights() +{ + for(int x=0; x<3; x++) + { + bertl.TurnLedOn(LED_FL2); + bertl.TurnLedOn(LED_FR2); + bertl.TurnLedOn(LED_BL1); + bertl.TurnLedOn(LED_BR1); + wait(0.1); + bertl.TurnLedOff(LED_FL2); + bertl.TurnLedOff(LED_FR2); + bertl.TurnLedOff(LED_BL1); + bertl.TurnLedOff(LED_BR2); + } +} + +void BlinkLeft() +{ + for(int x=0; x<3; x++) + { + bertl.TurnLedOn(LED_FL2); + bertl.TurnLedOn(LED_BL1); + wait(0.1); + bertl.TurnLedOff(LED_FL2); + bertl.TurnLedOff(LED_BL1); + } +} + +void BlinkRight() +{ + for(int x=0; x<3; x++) + { + bertl.TurnLedOn(LED_FR2); + bertl.TurnLedOn(LED_BR2); + wait(0.1); + bertl.TurnLedOff(LED_FR2); + bertl.TurnLedOff(LED_BR2); + } +} + +int main() +{ + while(1) + { + + } +}
diff -r 000000000000 -r b2556c73a145 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Dec 21 14:37:10 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4336505e4b1c \ No newline at end of file