Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def StepperMotorATest():
- motor.StepperMotorAInit()
- if a == 22 or a == 1:
- motor.StepperMotorAMove(-1000, 1000)
- time.sleep(2)
- motor.StepperMotorAMove(1000, 1000)
- time.sleep(2)
- elif a == 45 or a <= 0:
- motor.StepperMotorAMove(-4500, 1000)
- time.sleep(2)
- motor.StepperMotorAMove(4500, 1000)
- time.sleep(2)
- else:
- motor.StepperMotorAMove(500, 1000)
- time.sleep(2)
- motor.StepperMotorAMove(-500, 1000)
- time.sleep(2)
- #motor.StepperMotorAMove(-4500, 1000)
- #time.sleep(4)
- #motor.StepperMotorAMove(4500, 1000)
- #time.sleep(4)
- def StepperMotorBTest():
- motor.StepperMotorBInit()
- if b == 45 or b == 1:
- motor.StepperMotorBMove(4500, 1000)
- time.sleep(2)
- motor.StepperMotorBMove(-4500, 1000)
- time.sleep(2)
- elif b == 22 or b <= 0:
- motor.StepperMotorBMove(-1000, 1000)
- time.sleep(2)
- motor.StepperMotorBMove(1000, 1000)
- time.sleep(2)
- else:
- pass
- #motor.StepperMotorBMove(4500, 1000)
- #time.sleep(4)
- #motor.StepperMotorBMove(-4500, 1000)
- #time.sleep(4)
- try:
- if __name__=="__main__":
- motor = MotorBridge.MotorBridgeCape()
- while True:
- StepperMotorATest()
- StepperMotorBTest()
- except KeyboardInterrupt:
- print("Making Headway?")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement