Moderator: miprotek

 
yushengzhou
Topic Author
Posts: 4
Joined: 17 Oct 2018, 09:29

change OutputPWMActive use revpimodio2

18 Oct 2018, 09:27

hello everyone
can I change OutputPWMActive use revpimodio2 ?
 
User avatar
dirk
Posts: 119
Joined: 15 Dec 2016, 13:19

Re: change OutputPWMActive use revpimodio2

18 Oct 2018, 10:45

Hi yushengzhou, I have moved your post to the RevPiModIO board.
 
User avatar
miprotek
Posts: 150
Joined: 20 Jan 2017, 08:44
Contact:

Re: change OutputPWMActive use revpimodio2

18 Oct 2018, 16:13

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.
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
python3-RevPiModIO - https://revpimodio.org/ || Supported by miprotek GmbH - http://www.miprotek.de || Der RevPi ist das Beste, was passieren konnte!

Who is online

Users browsing this forum: No registered users and 1 guest