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

suggestion: add brightness to neopixel library #738

Open
tmountjr opened this issue Sep 28, 2023 · 1 comment
Open

suggestion: add brightness to neopixel library #738

tmountjr opened this issue Sep 28, 2023 · 1 comment

Comments

@tmountjr
Copy link

Not sure if this is the best place to do this but I thought I'd take a stab at this. The default build includes a NeoPixel library which is great, but the brightness on those things is enough to land an airliner at night, and yet there's no included way in the library to manage the brightness. On the C++ side, you can do this:

pixels.setBrightness(newBrightness);

where newBrightness is a value from 0 to 255. CircuitPython is a bit easier, you just do this:

pixels.brightness = 0.25

where the value you put in is a float between 0 and 1 (for 100%). But in both cases, setting that value recalculates the new values for each color bit and optionally redraws the string depending on if you have it set that way or not.

Would it be worth adding some basic brightness control to the existing library? Would I create a PR against this repo or against one somewhere else?

@tmountjr
Copy link
Author

Created a PR to address this: #739

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

1 participant