def move(height, shoulder, joint, wrist, fingers): myArm = Piktul('COM3', 9600) myArm.connect() myArm.setArm([height, shoulder, joint, wrist, fingers], 25) sleep(3) #myArm.gotoHome() myArm.shutDown()
def moveAll(): myArm = Piktul("COM3", 9600) myArm.connect() height = changeToNumber(Height.get()) height = InchChecker(height, 1) height = myArm.inchToDeg(height)[0] shoulder = changeToNumber(Shoulder.get()) shoulder = angleChecker(shoulder, 90) joint = changeToNumber(Joint.get()) joint = angleChecker(joint, 90) wrist = changeToNumber(Wrist.get()) wrist = angleChecker(wrist, 90) finger = changeToNumber(Fingers.get()) finger = InchChecker(finger, 0) finger = myArm.inchToDeg(finger)[0] myArm.setArm([ height * myArm.alphaOrient[0], shoulder * myArm.alphaOrient[1], joint * myArm.alphaOrient[2], wrist * myArm.alphaOrient[3], finger * myArm.alphaOrient[4] ], 25) myArm.shutDown()