Kyle Zampaglione
/
GloveBoxTester
Code for testing glovebox.
GloveBoxTester.cpp
- Committer:
- kzampag
- Date:
- 2013-07-16
- Revision:
- 2:73be4f9f04f9
- Parent:
- 1:f0943cae3bee
- Child:
- 3:ae51b59d29b8
File content as of revision 2:73be4f9f04f9:
#include "mbed.h" Serial pc(USBTX, USBRX); Serial lcd(p13,p14); DigitalOut pneumatics1(p11); DigitalOut pneumatics2(p12); DigitalOut box1(p23); DigitalOut box2(p22); DigitalOut box3(p21); int count = 1; int cycles = 5500; int main() { pc.printf(" \n \rHere we go! \n \r"); while(count< cycles) { //Trigger solenoid box1 = 1; box2 = 0; box3 = 0; wait(.3); box1 = 0; box2 = 1; wait(.3); box2 = 0; box3 = 1; wait(.3); box3 = 0; //Wait until box completely opens then trigger pneumatics wait(.7); pneumatics1 = 1; pneumatics2 = 0; //Wait until cylinder has finished travel wait(.8); pneumatics1 = 0; pneumatics2 = 1; //Wait to full retract then repeat wait(2); pneumatics1 = 0; pneumatics2 = 0; pc.printf("%d\r",count); count++; } }