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.
Fork of Beeper_Test by
Revision 2:0e1b409ff333, committed 2015-04-23
- Comitter:
- Dominik32
- Date:
- Thu Apr 23 12:33:34 2015 +0000
- Parent:
- 1:5bcd7fd92f60
- Commit message:
- Liniensensor Versuch 1
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 5bcd7fd92f60 -r 0e1b409ff333 main.cpp --- a/main.cpp Thu Apr 23 12:12:01 2015 +0000 +++ b/main.cpp Thu Apr 23 12:33:34 2015 +0000 @@ -7,50 +7,26 @@ -/* -int main() -{ - ur_Bertl karel; - while( !karel.NextToABeeper() ) - { - karel.Move(); - } - karel.PickBeeper(); - -} - -*/ - - - int main() { ur_Bertl karel; - int z = 0; - while(1) + while(1) { - 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); - } - + while(karel.NextToABeeper()) + { + karel.Move(); } - karel.Move(); + karel.MoveBackwards(); + karel.TurnLeft(); + + } + +} - } -} \ No newline at end of file + + + + +