JamesBarwell / rpi-gpio.js

Control Raspberry Pi GPIO pins with node.js
MIT License
657 stars 116 forks source link

Pwm #94

Open francolanzi opened 5 years ago

francolanzi commented 5 years ago

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!

JamesBarwell commented 5 years ago

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.

sholzmayer commented 3 years ago

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 🎉.

dzek69 commented 3 years ago

+1 for merging :)