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:427aa180d290, committed 2015-04-24
- Comitter:
- GreenOrange
- Date:
- Fri Apr 24 08:17:17 2015 +0000
- Parent:
- 0:6ff8c2bfa876
- Commit message:
- ClearAllBeepersToTheWall
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Apr 23 12:15:03 2015 +0000
+++ b/main.cpp Fri Apr 24 08:17:17 2015 +0000
@@ -3,23 +3,27 @@
int main()
{
- int a = 0;
ur_Bertl karel;
-
-while(1)
+
+
+ for(int i = 0; i < 3; i++)
{
while(!karel.NextToABeeper())
- {
- karel.Move();
- }
+ {
+ karel.Move();
+ }
- if(a <= 3)
- karel.PickBeeper();
- a++;
-
-
+
+ karel.PickBeeper();
+ karel.NibbleLeds(karel.AnyBeeperInBag());
+ wait(1);
+ if(i != 3)
+ {
+ while(karel.NextToABeeper())
+ {
+ karel.Move();
+ }
+ }
}
}
-
-