Skip to content

Commit

Permalink
Adding some source...
Browse files Browse the repository at this point in the history
  • Loading branch information
silver2row committed Nov 5, 2021
1 parent 1b5b27a commit 319118c
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/TryingToMove.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/python3

import MotorBridge
from time import sleep

motor = MotorBridge.MotorBridgeCape()
motor.StepperMotorAInit()

class morph:
def StepperMotorATest():
arch = int(input("Please type your favorite number! "))
if arch == 0:
sleep(2)
elif arch <= 24:
motor.StepperMotorAMove(2500, 1000)
sleep(3)
motor.StepperMotorAMove(-2500, 1000)
sleep(3)
elif arch >= 26:
motor.StepperMotorAMove(7500, 1000)
sleep(10)
motor.StepperMotorAMove(-7500, 1000)
sleep(10)
elif arch == 76:
motor.StepperMotorAMove(1000, 1000)
sleep(2)
motor.StepperMotorAMove(-1000, 1000)
sleep(2)
elif arch == 1000:
sleep(4)
print("Congrats on being you!", arch)
else:
print("I like baba boom!")

if __name__=="__main__":
try:
while True:
morph.StepperMotorATest()
except KeyboardInterrupt:
print("You have ended your entering of favorite numbers... ")

0 comments on commit 319118c

Please sign in to comment.