Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: SoftPWM Support for Dimmable LEDs #7

Open
rsg98 opened this issue Feb 6, 2017 · 3 comments
Open

Feature Request: SoftPWM Support for Dimmable LEDs #7

rsg98 opened this issue Feb 6, 2017 · 3 comments
Assignees

Comments

@rsg98
Copy link
Owner

rsg98 commented Feb 6, 2017

@mv1993 request - add a Brightness characteristic that's hooked into SoftPWM - enable dimming of LEDs

@rsg98
Copy link
Owner Author

rsg98 commented Feb 6, 2017

Looks like softPWM requires one of the root WiringPi setup modes - which would go against trying to run homebridge as a non-root user.

We could look at using the built in hardware PWM on the Pi (but that only gives you two channels and kills the audio) - http://www.jumpnowtek.com/rpi/Using-the-Raspberry-Pi-Hardware-PWM-timers.html

...or using I2C to speak to a multi-channel hardware PWM board like the AdaFruit one (https://www.adafruit.com/product/815).

...or find a library other than WiringPi that offers a SoftPWM accessible to non-root

I think my preference would be one of the hardware PWM options, as we can then use the same sysfs interface to get non-root access (albeit, not via WiringPi)

@mv1993
Copy link

mv1993 commented Feb 7, 2017

For me two outputs are enough, but other users may need more.
I also think its easier and safer to handle the request with the hardware PWM. I searched a bit on the web but I didn't find any library that supports softPWM, except wiringPi.

@fivdi
Copy link

fivdi commented Feb 25, 2017

pigpio supports PWM on any of GPIO0 through GPIO31 but requires root privileges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants