Skip to content

How can I set an overall brightness? #761

Answered by Makuna
ardumiguel asked this question in Q&A
Discussion options

You must be logged in to vote

https://github.com/Makuna/NeoPixelBus/wiki/FAQ-%239
There is an example using NeoPixelBusLg and it has replaced NeoPixelBrightnessBus so that FAQ needs to get updated.
Key thing is, GetPixelColor() and overall brightness changes are fraught with hidden problems that too many users kept hitting and not understanding.

So, if you need GetPixelColor to work (provide the original color without the brightness applied) then the recommended way is demonstrated in the NeoPixelDibTest example.

Create a buffer, treat it as your strip for your animations and calls to GetPixelColor/SetPixelColor. Then Render that buffer into the NeoPixelBus object.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ardumiguel
Comment options

@Makuna
Comment options

@ardumiguel
Comment options

@Makuna
Comment options

Answer selected by Makuna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants