Matthias Dorudi
/
If-test
Test of ifs and else
Revision 0:05b24581db56, committed 2015-04-16
- Comitter:
- matthiasdorudi
- Date:
- Thu Apr 16 11:46:58 2015 +0000
- Commit message:
- IfWirdGetestet
Changed in this revision
diff -r 000000000000 -r 05b24581db56 Bertl_If.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Bertl_If.cpp Thu Apr 16 11:46:58 2015 +0000 @@ -0,0 +1,3 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "const.h" \ No newline at end of file
diff -r 000000000000 -r 05b24581db56 Bertl_If.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Bertl_If.h Thu Apr 16 11:46:58 2015 +0000 @@ -0,0 +1,3 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "const.h" \ No newline at end of file
diff -r 000000000000 -r 05b24581db56 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Apr 16 11:46:58 2015 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "const.h" + +int main(){ + + ur_Bertl tom; //So sprich ich ihn an + + tom.Move(); //Er fährt + + while(1) //Endlosschleife + { + if(tom.IsButtonPressed(BTN_FLL)){ //Bedingung für den Button + tom.NibbleLeds(0x0A); //Anweisung zum einschalten des Lichts + } + else{ + tom.NibbleLeds(0x00); //Wenn er nicht gepresst ist schalte die Lichter aus + } + + if (tom.IsButtonPressed(BTN_FM)){ //Bedingung + tom.TurnLeft(); //Anweisung + tom.Move(); + } + } +} \ No newline at end of file
diff -r 000000000000 -r 05b24581db56 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Apr 16 11:46:58 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0 \ No newline at end of file
diff -r 000000000000 -r 05b24581db56 ur_Bertl.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ur_Bertl.lib Thu Apr 16 11:46:58 2015 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/teams/BERTL_CHEL_18/code/ur_Bertl/#6b667e2cb800