Hi Guys, below is the code written to operate 3 screw jack undercarriage motors, two operating from the arduino motor shield and the third from a third part device. The code has a flaw, the motors do not reverse on signal change.

//IN1 control for motor, set LOW pin 0//IN2 control for motor, set HIGH pin 1//FB feedback to pin A2//EN enable board set to high or low on pin 5 called motorCEN//INV is motor direction set to high or low on pin 10, called motorC//D2 is pwm motor control on pin 6//free pins are..,1,0

//int updwncalc = (updwn-updwn2); //int updwncalc2 = (updwncalc*updwncalc); int iB = 0; //this creates and sets a variable named iB which we will use to make sure the motors stop once they reach overcurrent condition int iA = 0; //this creates and sets a variable named iA which we will use to make sure the motors stop once they reach overcurrent condition int iC = 0; //this creates and sets a variable named iC which we will use to make sure the motors stop once they reach overcurrent condition myservoA.writeMicroseconds(900); myservoB.writeMicroseconds(900); // myservoC.writeMicroseconds(900); switchstate2 = switchstate; delay(300); while (switchstate2 == switchstate) { //the while loop here knows the current state of the switch updwn. during the while loop it will continually check //the state of the switch by setting updwn2 therefore once the state of the switch changes it will exit the while loop