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 to adjust maximum brightness of LED pulse method #86

Open
kbasaran opened this issue Nov 19, 2022 · 1 comment
Open

Feature to adjust maximum brightness of LED pulse method #86

kbasaran opened this issue Nov 19, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@kbasaran
Copy link

Is your feature request related to a problem? Please describe.
The pulse method of PWMLED pulses always from 0% to 100%. I built a device that has a sleep mode and to show that it is in sleep, I use a slow pulse and want the brightness to go from 0% to 20%. When my device is on, I set the brightness to 100% and stop the pulse.

Describe the solution you'd like
Adding a "max_value" kwarg to the method, with default value of 1.

@martinohanlon
Copy link
Collaborator

This an interesting idea. Not one I had thought of. I can understand why it would be useful.

If making this change I would be tempted to also include a minimum value, so you could pulse/blink between a lower and an upper value.

It would be a change to PWMOutputDevice.blink to include min_value and max_value parameters and then updates to relevant interfaces e.g. pulse to call this.

@martinohanlon martinohanlon added the enhancement New feature or request label Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants