Curtis Sellier / Mbed 2 deprecated Project_Car_Curtis_Non_Tested

Dependencies:   Servo mbed

Files at this revision

API Documentation at this revision

Comitter:
csellier
Date:
Thu Oct 13 22:01:56 2016 +0000
Parent:
5:40033f403d50
Child:
7:5da0ff9752d5
Commit message:
Update Collision Avoidance program only

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Oct 11 22:04:14 2016 +0000
+++ b/main.cpp	Thu Oct 13 22:01:56 2016 +0000
@@ -45,13 +45,16 @@
             ServoRight.write(0.5);   //turn right
             ServoLeft.write(0.4);
         } else {
-            // turn left    
+            ServoRight.write(0.6)   // turn left
+            ServoLeft.write(0.5)    
         }
     } else if (left > DISTANCE) {
         if (right < DISTANCE) {
-            // right
+            ServoRight.write(0.5) // right
+            ServoLeft.write(0.4)
         } else {
-            // forward    
+            ServoRight.write(0.6) // forward    
+            ServoLeft.write(0.4)
         }
     }
     
@@ -59,7 +62,7 @@
     LEDleft=1;
     LEDright=1;
     
-    // sernd the servo command to the servos themselves
+    // send the servo command to the servos themselves
     ServoRight.write(0.6); // write to the continuous rotation servo1
     ServoLeft.write(0.4); // write to the continous servo2