Code for testing glovebox.

Dependencies:   mbed

Revision:
2:73be4f9f04f9
Parent:
1:f0943cae3bee
Child:
3:ae51b59d29b8
--- a/GloveBoxTester.cpp	Fri Jul 12 00:02:51 2013 +0000
+++ b/GloveBoxTester.cpp	Tue Jul 16 19:03:26 2013 +0000
@@ -11,7 +11,7 @@
 
 
 int count = 1;
-int cycles = 10000;
+int cycles = 5500;
 
 
 
@@ -24,32 +24,40 @@
 
 
         //Trigger solenoid
-        box1 = 1;
-        box2 = 1;
-        box3 = 1;
+box1 = 1;
+box2 = 0;
+box3 = 0;
+wait(.3);
 
-        //Turn off solenoid after .2 because they draw a lot of current
-        wait(0.2);
-        box1 = 0;
-        box2 = 0;
-        box3 = 0;
+box1 = 0;
+box2 = 1;
+wait(.3);
+
+box2 = 0;
+box3 = 1;
+wait(.3);
+
+
+box3 = 0;
+
 
         //Wait until box completely opens then trigger pneumatics
-        wait(.5);
+        wait(.7);
         pneumatics1 = 1;
         pneumatics2 = 0;
 
         //Wait until cylinder has finished travel
-        wait(0.3);
+        wait(.8);
         pneumatics1 = 0;
         pneumatics2 = 1;
 
         //Wait to full retract then repeat
-        wait(0.3);
-        
+        wait(2);
+        pneumatics1 = 0;
+        pneumatics2 = 0;
         pc.printf("%d\r",count);
         count++;
-        
+
 
     }
 }