I am trying to control a fan using Raspberry Pi. For that I tried to use the PWM pin in raspbery Pi. I am using Qt C++ to control the fan. I installed the wiring Pi and run the Wiring pi using command line and I checked the man page of Wiring Pi. The man page not given any exact detail to set frequency and change duty cycle
I failed to set a fixed frequency(25KHz) and set duty cycle from 0 to 100% using wiring pi and man page details.
How toset a fixed frequency and vary duty cycle in Raspberry Pi PWM pin using wiring Pi or any other solution I can use in my Qt C++ code to control the PWM pin.
pwmSetMode(PWM_MODE_MS);
? Personally I have not used PWM and I don't have an oscilloscope so that I can test (and experiment with wiringPi) code but by reading documentation of wiringPi, this should work ideally. – dhruvvyas90 Jul 01 '15 at 06:59When I change pwmWrite (1, 5); to pwmWrite (1, 200); It affect frequency also in oscilloscope. Is there any worong in my code
– Arun Kumar K S Jul 01 '15 at 07:29