Robot code for searching an object and charging at it.
Dependencies: HCSR04 Motor mbed
Diff: main.cpp
- Revision:
- 8:43a650f9d4af
- Parent:
- 7:d94d23c55015
- Child:
- 10:cec68ef272cd
--- a/main.cpp Sat May 23 17:03:48 2015 +0000 +++ b/main.cpp Sat May 23 17:08:45 2015 +0000 @@ -80,7 +80,7 @@ Timer t; t.start(); - //while(1) { + while(1) { // Sample code to detect and object and charge at it if (detect_object(range, searchspeed)) { @@ -89,10 +89,11 @@ stop(); } else { - moverandom(); + moverandom(); + } stop(); - //} + } }