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:
- 41:2b6b73dd897c
- Parent:
- 40:02f6e268011b
- Child:
- 42:69bffd3679bf
--- a/main/main.cpp Wed Apr 15 14:55:58 2020 +0000 +++ b/main/main.cpp Wed Apr 15 15:52:16 2020 +0000 @@ -31,8 +31,6 @@ { init(); - bool loop_check; - robot.lcd_goto_xy(0,0); robot.lcd_print("A=SIMPLE", 10); robot.lcd_goto_xy(0,1); @@ -707,10 +705,14 @@ // robot.reverse(speed); // wait(0.1); robot.spin_right(TURN_SPEED); - wait(0.6); -// while (sensor[3] < SENS_THRESH) { robot.scan(); } -// -// while (sensor[3] > SENS_THRESH) { robot.scan(); } + if(loop_check == false) { // works better for looped + wait(0.6); + } + else { + while (sensor[3] < SENS_THRESH) { robot.scan(); } + + while (sensor[3] > SENS_THRESH) { robot.scan(); } + } } void simplify()