Robot code for searching an object and charging at it.

Dependencies:   HCSR04 Motor mbed

Files at this revision

API Documentation at this revision

Comitter:
abdsha01
Date:
Sat May 30 15:36:35 2015 +0000
Parent:
10:cec68ef272cd
Child:
13:10e7fd80906c
Commit message:
Can't remember what I did

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat May 23 17:48:01 2015 +0000
+++ b/main.cpp	Sat May 30 15:36:35 2015 +0000
@@ -94,11 +94,13 @@
                     reverse(searchspeed);
                     wait(2);
                     stop();
+                    detect = 0
                     break;
                     // If line is detected from back just keep on moving forward
                 } else if (detect == -1) {
                     wait(2);
                     stop();
+                    detect = 0
                     break;
                 }
             }