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:
- 7:7215adbae3da
- Parent:
- 6:1bcfda49e146
- Child:
- 8:4a32fc9ee939
--- a/main.cpp Sun May 14 03:07:09 2017 +0000 +++ b/main.cpp Sun May 14 19:57:34 2017 +0000 @@ -47,12 +47,22 @@ while(1) { setup(); led_1 = 1; - driver->drive_one_forward(); - //pc.printf("total error %f\n\r", driver->total_error); + //if (!driver->has_front_wall()) { + driver->drive_forward(); + //} + /* + else if (!driver->has_right_wall) { + // driver->turn_right(); + // turn_right() in drivecontrol will call pid_controller::turn(RIGHT) + } + else if (!driver->has_left_wall) { + // driver->turn_left() + } + else { // has all three walls + // driver->turn_around(); + }*/ + wait_ms(1); - //wait(2); -// // driver->stop(); -// wait(3); } } \ No newline at end of file