Maximilian Zingerle
/
IfBertl
Wenn Button gedrückt wird, aktiviere LED
Revision 0:7e14463425e0, committed 2015-04-16
- Comitter:
- DerMax
- Date:
- Thu Apr 16 11:56:30 2015 +0000
- Commit message:
- Wenn Button gedr?ckt wird, aktiviere zugewiesene LED
Changed in this revision
diff -r 000000000000 -r 7e14463425e0 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Apr 16 11:56:30 2015 +0000 @@ -0,0 +1,38 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "const.h" + +int main() +{ + ur_Bertl karel; + while(1) + { + if( karel.IsButtonPressed(BTN_FLL)) //Wenn Button gedrückt ist, aktiviere LED + { + karel.NibbleLeds(0x0A); //Falls nicht, schalte alle LEDs aus + } + else + { + karel.NibbleLeds(0x00); + } + if( karel.IsButtonPressed(BTN_FL)) + { + karel.NibbleLeds(0x0B); + } + if( karel.IsButtonPressed(BTN_FM)) + { + karel.NibbleLeds(0x0C); + } + if( karel.IsButtonPressed(BTN_FR)) + { + karel.NibbleLeds(0x0D); + } + if( karel.IsButtonPressed(BTN_FRR)) + { + karel.NibbleLeds(0x0E); + } + + + + } +}
diff -r 000000000000 -r 7e14463425e0 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Apr 16 11:56:30 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 7e14463425e0 ur_Bertl.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ur_Bertl.lib Thu Apr 16 11:56:30 2015 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/teams/BERTL_CHEL_18/code/ur_Bertl/#6b667e2cb800