Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4226

C/C++ • Re: WiringPi replacement?

$
0
0
Sure, to make it easy, I just threw all examples on Gihub. https://github.com/drankinatty/pi-wo-root (couldn't think of a better name for the repo, so it became "Pi without root") What you want is the pwmsoft library, and then see either the pwmsoftrgb example in the tst folder (for 3-color LED) or the pwmsoftpth example. (single color LED). That will get you started with the software PWM interface and GPIO_V2 ABI to ioctl.

In the lib directory, you can use the pwm lib for hardware PWM through sysfs if you wanted hardware PWM.

Statistics: Posted by drankinatty — Tue May 07, 2024 5:28 am



Viewing all articles
Browse latest Browse all 4226

Trending Articles