Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:5bcd7fd92f60, committed 2015-04-23
- Comitter:
- Dominik32
- Date:
- Thu Apr 23 12:12:01 2015 +0000
- Parent:
- 0:363abd3fc535
- Child:
- 2:0e1b409ff333
- Commit message:
- Zum Beeper fahren
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| ur_Bertl.lib | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Apr 16 11:54:02 2015 +0000
+++ b/main.cpp Thu Apr 23 12:12:01 2015 +0000
@@ -3,22 +3,54 @@
#include "const.h"
#include "Alle_Befehle.h"
+
+
+
+
+/*
+int main()
+{
+ ur_Bertl karel;
+ while( !karel.NextToABeeper() )
+ {
+ karel.Move();
+ }
+ karel.PickBeeper();
+
+}
+
+*/
+
+
+
+
int main()
{
- Alle_Befehle_bertl karel;
+ ur_Bertl karel;
+ int z = 0;
- for (int x = 0; x < 10; x++)
+ while(1)
{
-
-
- if( karel.IsButtonPressed(BTN_FLL || BTN_FL || BTN_FM || BTN_FR || BTN_FRR || BTN_BL || BTN_BM || BTN_BR))
- karel.TurnLeft();
-
-
+ if(karel.NextToABeeper())
+ {
+ z = z++;
+ if(z == 1)
+ {
+ karel.RGBLed(1,0,0);
+ }
+
+ else if(z == 2)
+ {
+ karel.RGBLed(0,1,0);
+ }
+
+ else if(z > 2)
+ {
+ karel.RGBLed(0,0,1);
+ }
+
+ }
karel.Move();
}
-
- karel.ShutOff();
-
-}
+}
\ No newline at end of file
--- a/ur_Bertl.lib Thu Apr 16 11:54:02 2015 +0000 +++ b/ur_Bertl.lib Thu Apr 23 12:12:01 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/teams/BULME_BERTL_2CHEL/code/ur_Bertl/#66e9a0afcbd6 +http://developer.mbed.org/teams/BERTL_CHEL_18/code/ur_Bertl/#07e55b300ff1