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:40:45 2015 +0000
Parent:
11:b45798cc3c10
Parent:
12:703f75ae2453
Child:
15:a821a0c599b3
Commit message:
Merged previous two revisions

Changed in this revision

--- a/main.cpp	Sat May 23 19:31:37 2015 +0000
+++ b/main.cpp	Sat May 30 15:40:45 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;
                 }
             }