Markus Watko
/
Button
GoToBeeper2
Revision 0:58c13a57ed81, committed 2015-04-24
- Comitter:
- Markus_Watko
- Date:
- Fri Apr 24 08:11:28 2015 +0000
- Commit message:
- GoToBeeper2
Changed in this revision
diff -r 000000000000 -r 58c13a57ed81 Button.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Button.cpp Fri Apr 24 08:11:28 2015 +0000 @@ -0,0 +1,12 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "Button.h" +/* +void Button :: MoveBack() +{ + int count = _count; + + MotorR_EN = MotorL_EN = 1; + MotorR_Reverse = MotorL_Reverse = 1; + +}*/ \ No newline at end of file
diff -r 000000000000 -r 58c13a57ed81 Button.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Button.h Fri Apr 24 08:11:28 2015 +0000 @@ -0,0 +1,14 @@ +/*#include "mbed.h" +#include "ur_Bertl.h" + + +#ifndef BUTTON + +class Back_Bertl : public ur_Bertl +{ + public: + void MoveBack(); + +}; + +#endif*/ \ No newline at end of file
diff -r 000000000000 -r 58c13a57ed81 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Apr 24 08:11:28 2015 +0000 @@ -0,0 +1,42 @@ +#include "mbed.h" +#include "ur_Bertl.h" + + + + +int main() +{ + ur_Bertl karel; + + bool x = true; + int cnt = 0; + + do + { + karel.Move(); + + if (karel.IsButtonPressed(0x80)) + { + for(int i = 0; i <= 5; i++) + { + karel.NibbleLeds(0x0F); + wait(0.1); + karel.NibbleLeds(0x00); + wait(0.1); + cnt++; + } + + if ( cnt >= 2) + { + x = false; + } + + karel.MoveBackwards(); + karel.TurnLeft(); + + + } + + + }while(x); +}
diff -r 000000000000 -r 58c13a57ed81 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Apr 24 08:11:28 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 58c13a57ed81 ur_Bertl.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ur_Bertl.lib Fri Apr 24 08:11:28 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/BERTL_CHEL_18/code/ur_Bertl/#6b667e2cb800