Lab3

Dependencies:   mbed-rtos mbed

Fork of ESE519_Lab3_v4 by ese519

Revision:
4:0b22363eb57c
Parent:
3:2f8e2399dfe8
Child:
5:5380953108bb
diff -r 2f8e2399dfe8 -r 0b22363eb57c main.cpp
--- 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