Page 1 of 1

change OutputPWMActive use revpimodio2

Posted: 18 Oct 2018, 09:27
by yushengzhou
hello everyone
can I change OutputPWMActive use revpimodio2 ?

Re: change OutputPWMActive use revpimodio2

Posted: 18 Oct 2018, 10:45
by dirk
Hi yushengzhou, I have moved your post to the RevPiModIO board.

Re: change OutputPWMActive use revpimodio2

Posted: 18 Oct 2018, 16:13
by RevPiModIO
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.

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...
Regards, Sven