hello everyone
can I change OutputPWMActive use revpimodio2 ?
change OutputPWMActive use revpimodio2
Moderator: RevPiModIO
Re: change OutputPWMActive use revpimodio2
Hi yushengzhou, I have moved your post to the RevPiModIO board.
- RevPiModIO
- KUNBUS
- Posts: 335
- Joined: 20 Jan 2017, 08:44
- Contact:
Re: change OutputPWMActive use revpimodio2
OutputPWMActive is a Memory (a setting for the piControl), which you have to set in piCtory!!!
If you activate the PWM for one or more outputs, you can use the outputs "PWM_1", "PWM_2" and so on to control the frequency of PWM.
Regards, Sven
If you activate the PWM for one or more outputs, you can use the outputs "PWM_1", "PWM_2" and so on to control the frequency of PWM.
Code: Select all
import revpimodio2
rpi = revpimodio2.RevPiModIO(autorefresh=True)
# Max
rpi.io.PWM_1.value = 255
# Off
rpi.io.PWM_1.value = 0
# Very low
rpi.io.PWM_1.value = 1
# Something else :D
rpi.io.PWM_1.value = 100
# And so on...
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!