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 GradientSolver by
Diff: main.cpp
- Revision:
- 5:87cbce6dc969
- Parent:
- 4:9dd1477111da
- Child:
- 6:53ea00c03b22
diff -r 9dd1477111da -r 87cbce6dc969 main.cpp
--- a/main.cpp Thu Jun 05 14:20:37 2014 +0000
+++ b/main.cpp Thu Jun 05 14:30:58 2014 +0000
@@ -96,12 +96,14 @@
wait(1);
//Determine which direction is darkest
+
+
//If the darkest spot is found, stop, play victory sound
if(v1==2000){
thinggy.stop();
thinggy.cls();
thinggy.printf("Found it");
- thinggy.forward(0.2);
+ thinggy.forward(0.3);
wait(0.1);
thinggy.stop();
wait(1);
@@ -113,7 +115,7 @@
thinggy.cls();
thinggy.printf("Found it");
turn_right();
- thinggy.forward(0.2);
+ thinggy.forward(0.3);
wait(0.1);
thinggy.stop();
wait(1);
@@ -127,7 +129,7 @@
thinggy.printf("Found it");
turn_right();
turn_right();
- thinggy.forward(0.2);
+ thinggy.forward(0.3);
wait(0.1);
thinggy.stop();
wait(1);
@@ -142,7 +144,7 @@
turn_right();
turn_right();
turn_right();
- thinggy.forward(0.2);
+ thinggy.forward(0.3);
wait(0.1);
thinggy.stop();
wait(1);
@@ -156,7 +158,7 @@
thinggy.printf("Found it");
turn_left();
turn_left();
- thinggy.forward(0.2);
+ thinggy.forward(0.3);
wait(0.1);
thinggy.stop();
wait(1);
@@ -169,13 +171,15 @@
thinggy.cls();
thinggy.printf("Found it");
turn_left();
- thinggy.forward(0.2);
+ thinggy.forward(0.3);
wait(0.1);
thinggy.stop();
wait(1);
victors();
return found=1;
}
+
+
//Continue the search
//North is darkest
if(v1>v2 and v1>v3 and v1>v4 and v1>v5 and v1>v6){
