-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b5b27a
commit 319118c
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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... ") |