Advertisement
Guest User

Untitled

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