-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Alternative to adjust Brightness on RGB matrix #3409
Comments
You're right that this isn't possible right now. It would need to be added "upstream", so I've filed a bug there: adafruit/Adafruit_Protomatter#19 Until that feature is added and then made available in Circuitpython, depending on what you're doing, you can
|
Sweet, thank you Ill test those out |
Any update on this? |
unlikely to be added any time soon, it is nontrivial |
Louis Beaudoin has it worked out in the SmartMatrix library. Maybe you could steal his code. |
FYI, this approach doesn't seem to work on the MatrixPortal S3 with CircuitPython. The actual brightness of 0x7f7f7f is exactly the same as 0xffffff. :-(. I was hoping this would be a solution, but no dice. I'm getting complaints about the LED being so bright it's hurting people's eyes, so I'm hoping a workaround will show up somehow. |
I haven’t used the S3 version of the MatrixPortal yet, but suspect that the default color bit depth is set to two bits, just four levels of color brightness, limiting the granularity of intensity. |
So, I have a RGBMatrix brightness workaround... you can even use a brightness control to adjust the brightness values of all text/vectorio shapes and displayed BMP images. I'm defining all color values in HLS instead of Hex, which makes it super simple to change the brightness without changing the color value (just adjust L/level). For BMPs, feed the pixel_shader into a function that converts the integer colors to HSL, then adjusts their level and inserts the new value back into the pixel_shader. Relevant code is in this file: All colors are defined like this: It works well, although if you set the brightness too low... (anything around .2 or lower) colors will start shifting hue. |
Yup, that was the problem. After setting the buffer depth to 6-bits adjusting the RGB values by a scale enabled a decent control over brightness. Thanks for the suggestion! |
Hey guys, Sorry if this as been discussed already but I can't find anything using google and search on here.
I've been playing around with the Feather M4 express and an 64x32 RGB matrix. First thing I've been looking for when I started running demos is for a way to reduce the brightness.
I found that you can only turn on or off the LEDs by setting the brightness attribute to 1.0 or 0.0:
https://circuitpython.readthedocs.io/en/5.3.x/shared-bindings/rgbmatrix/RGBMatrix.html
Is there any way I can hack my way to adjust the brightness? On all my other raspberry pi projects where I run an rgb matrix, I set them to half brightness because I feel like looking at it 100% brightness is way too intense.
Thank you so much in advance
The text was updated successfully, but these errors were encountered: