Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- from sysfs_pwm import Pwm # https://pastebin.com/R70P1wAn
- # initialize and enable pwm, automatically disable when scope is left
- with Pwm('/dev/bone/pwm/1/a', frequency=20000, value=0) as pwm:
- while True:
- pwm.value = float(input("Enter PWM value (between 0.0 and 1.0): "))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement