1

Can anyone give me the program for controlling PWM by wiringpi through python programming? I have already searched on the net but could only find program through C programming.

  • This answer might help, but not WiringPi: How can Rpi move a servo motor using a GPIO pin in PWM mode? https://raspberrypi.stackexchange.com/questions/98467/how-can-rpi-move-a-servo-motor-using-a-gpio-pin-in-pwm-mode/98481#98481. – tlfong01 Feb 01 '20 at 14:59
  • 1
    What do you want to control with PWM? Here is an LED controlled by PWM using gpiozero https://gpiozero.readthedocs.io/en/stable/recipes.html#led-with-variable-brightness WiringPi is deprecated! – CoderMike Feb 01 '20 at 15:02
  • 1
    Actually I want to control something with 50 KHZ frequency with variable duty cycle. But first I want to get the 50 KHZ frequency PWM with best accuracy. I tried to get this with RPI library but it gives me desired accuracy upto 5 KHZ only. Then I read somewhere that with wiringpi library, we can get PWM frequency upto 19.2 MHZ. But I am yet to find the program through python language. – Abhilash Wakodikar Feb 01 '20 at 15:49
  • 1
    Please edit those additional details into the question and I will re-open it. – goldilocks Feb 01 '20 at 17:00

0 Answers0