Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import MotorBridge
- import time
- MotorName = 1
- MotorName = 4
- ClockWise = 1
- CounterClockWise = 2
- PwmDuty = 90
- Frequency = 1000
- if __name__=="__main__":
- motor = MotorBridge.MotorBridgeCape()
- motor.DCMotorInit(1,1000)
- motor.DCMotorInit(4, 1000)
- while True:
- motor.DCMotorMove(1,1,90)
- time.sleep(2)
- motor.DCMotorMove(4,1,90)
- time.sleep(2)
- motor.DCMotorMove(1,2,90)
- time.sleep(2)
- motor.DCMotorMove(4,2,90)
- time.sleep(2)
- print "hello"
- motor.DCMotorStop(1)
- time.sleep(2)
- motor.DCMotorStop(4)
- time.sleep(2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement