Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- from PWM_ideasTwo import PWM as PWM
- from time import sleep
- try:
- abort = int(input("Please enter a 0 or 1: "))
- if abort >= 1:
- PWM.start = 0
- PWM.set_frequency = 50
- PWM.set_duty_cycle = 10
- sleep(5)
- else:
- PWM.set_frequency = 80
- PWM.set_duty_cycle = 10
- sleep(5)
- except KeyboardInterrupt:
- print ("Hello!")
- PWM.stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement