Avinash Repaka / Mbed 2 deprecated Lab4_519

Dependencies:   mbed

Revision:
1:4ec28912c9e7
Parent:
0:27111a353928
Child:
2:2cc70773996b
--- a/main.cpp	Tue Mar 24 00:09:00 2015 +0000
+++ b/main.cpp	Thu Mar 26 02:25:46 2015 +0000
@@ -1,18 +1,28 @@
 #include "mbed.h"
 #include "DCMotor.h"
-#include "ServoMotor.h"
-
+#include "LeftServoMotor.h"
+#include "RightServoMotor.h"
+#include "Keypad.h"
+//#include "RequestQueue.h"
+ 
 DigitalOut myled(LED1);
-
+ 
 int main() {
+    initializeKeypad();
     DCMotor dcMotor(p21,p17,p18);
-    //ServoMotor leftDoor(p11);
+    LeftServoMotor leftDoor(p22);
+    RightServoMotor rightDoor(p23);
     while(1) {
-        dcMotor.forward();
+        //dcMotor.forward();
+        leftDoor.open();
+        rightDoor.open();
         myled = 1;
-        wait(1);
-        dcMotor.reverse();
+        //pc.printf("dada");
+        wait(3);
+        //dcMotor.stop();
+        leftDoor.close();
+        rightDoor.close();
         myled = 0;
-        wait(1);
+        wait(3);
     }
-}
+}
\ No newline at end of file