Lab3

Dependencies:   mbed-rtos mbed

Fork of ESE519_Lab3_v3 by ese519

Files at this revision

API Documentation at this revision

Comitter:
jfields
Date:
Fri Oct 16 17:22:40 2015 +0000
Parent:
3:2f8e2399dfe8
Commit message:
q

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Oct 16 17:01:02 2015 +0000
+++ b/main.cpp	Fri Oct 16 17:22:40 2015 +0000
@@ -44,8 +44,8 @@
 Timer t;
 float period = 0.02;    // sec
 float dty_dc = 0.75;    // PCT [0-100]
-float dty_servo_open = 0.1125;  // PCT [3.75-11.25]
-float dty_servo_close = 0.0375; // PCT [3.75-11.25]
+float dty_servo_close = 0.1125;  // PCT [3.75-11.25]
+float dty_servo_open = 0.0375; // PCT [3.75-11.25]
 int cur_floor = 0;
 int desired_floor = 0;
 int floor_period;   // for period detection
@@ -107,6 +107,8 @@
                 }
 
                 // start car
+                servo1.write(dty_servo_close);
+                servo2.write(dty_servo_close);
                 dc_motor.write(dty_dc);
 
                 // check IR sensors