rpi-gpio.js
rpi-gpio.js copied to clipboard
Pwm
I added support for PWM signals. It's a prerequisite to write the line: "dtoverlay=pwm-2chan" in the file /boot/config.txt to enable the PWM. I tested it briefly in my Raspberry Pi 3 B, but if someone could do a deeper test, feel free to do that. Any suggestion is welcome!
Thanks very much for the contribution. It's not something I've really explored much as I haven't needed it myself, and it can be difficult keeping up with the limited functionality this module offers currently.
There was a request for it back in #62 though - maybe there is more demand?
I hope you won't mind if I leave this for a bit until I've chance to read up on how it all works a bit more.
For me this implementation looks similar to the python implementation. There is some further explanation on how the pwm management on the raspberry pi kernel works.
I would be glad to see this pull request merged 🎉.
+1 for merging :)