Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import MotorBridge
- import time
- from flask import Flask, render_template
- FirstLegOne = 1000
- SecondLegTwo = -1000
- LegOneGo = 2000
- LegOneGo2 = -2000
- LegTwoGo = 3000
- LegTwoGo2 = -3000
- app = Flask(__name__)
- @app.route("/")
- def StepperMotorATest(self, FirstLegOne):
- print('Stepper A is on the move!')
- motor.StepperMotorAInit()
- motor.StepperMotorAMove(LegOne1, 1000) # 1000 steppers 1000us every step
- time.sleep(4)
- motor.StepperMotorAMove(LegOne2, 1000) # 1000 steppers 1000us every step
- time.sleep(4)
- self = self
- self.FirstLegOne = LegOneGo
- def StepperMotorBTest(self, SecondLegTwo):
- print('Stepper B moves too!')
- motor.StepperMotorBInit()
- motor.StepperMotorBMove(LegTwo1, 1000) # 1000 steppers 1000us every step
- time.sleep(4)
- motor.StepperMotorBMove(LegTwo2, 1000) # 1000 steppers 1000us every step
- time.sleep(4)
- self = self
- self.SecondLegTwo = LegTwoGo
- if __name__=="__main__":
- motor = MotorBridge.MotorBridgeCape()
- a = int(input("Please enter a numerical value below 50,000 to -50,000: "))
- for a in range(0, 999):
- StepperMotorATest(a, FirstLegOne)
- StepperMotorBTest(a, SecondLegTwo)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement