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.
Dependencies: mbed 3875_Individualproject
Diff: main/main.cpp
- Revision:
- 8:b862106f1162
- Parent:
- 7:7fefd782532d
- Child:
- 9:952586accbf9
diff -r 7fefd782532d -r b862106f1162 main/main.cpp --- a/main/main.cpp Sat Feb 22 03:21:56 2020 +0000 +++ b/main/main.cpp Sat Feb 22 04:46:51 2020 +0000 @@ -182,9 +182,6 @@ } } - robot.stop(); - wait(0.2); - robot.scan(); if ( sensor[0] > sens_thresh && (sensor[1] < sens_thresh && sensor[2] < sens_thresh && sensor[3] < sens_thresh) ) { robot.forward(speed); @@ -196,7 +193,6 @@ robot.scan(); } - robot.stop(); if ( sensor[1] > sens_thresh || sensor[2] > sens_thresh || sensor[3] > sens_thresh ) { straight = true; @@ -214,26 +210,6 @@ } - robot.stop(); - wait(0.2); - robot.scan(); - - if ( sensor[0] > sens_thresh && (sensor[1] < sens_thresh && sensor[2] < sens_thresh && sensor[3] < sens_thresh) ) { - robot.forward(speed); - goal_test1 = true; - while ( sensor[0] > sens_thresh && sensor[1] < sens_thresh && sensor[2] < sens_thresh && sensor[3] < sens_thresh ) { - robot.scan(); - } - robot.scan(); - if ( sensor[0] > sens_thresh && (sensor[1] > sens_thresh && sensor[2] > sens_thresh && sensor[3] > sens_thresh)) { - goal_test2 = true; - //goal(); - } - robot.scan(); - } - - robot.stop(); - if ( sensor[1] > sens_thresh || sensor[2] > sens_thresh || sensor[3] > sens_thresh ) { straight = true; }