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
Diff: main.cpp
- Revision:
- 9:65a9aad9a5b5
- Parent:
- 8:4a32fc9ee939
- Child:
- 14:a646667ac9ea
--- a/main.cpp Wed May 17 00:07:32 2017 +0000 +++ b/main.cpp Wed May 17 00:14:03 2017 +0000 @@ -48,10 +48,14 @@ setup(); led_1 = 1; driver->getEncoder(); - wait(1); - //if (!driver->has_front_wall()) { - //driver->drive_forward(); - //} + //wait(1); + if (!driver->has_front_wall()) { + driver->drive_forward(); + } + else{ + driver->stop(); + } + //wait_ms(1); /* else if (!driver->has_right_wall) { // driver->turn_right(); @@ -64,7 +68,7 @@ // driver->turn_around(); }*/ - //wait_ms(1); + // driver->stop(); } } \ No newline at end of file