pimoroni / pimoroni-pico

Libraries and examples to support Pimoroni Pico add-ons in C++ and MicroPython.
https://shop.pimoroni.com/collections/pico
MIT License
1.24k stars 474 forks source link

Interstate 75 W, no global brightness function? #805

Open alphanumeric007 opened 11 months ago

alphanumeric007 commented 11 months ago

Interstate 75 W, Pimoroni Micro python uf2 V120.3

I was wanting to adjust the brightness of my array based on background light. Hunting around through the documentation for the Interstate 75 I noticed there wasn't any global brightness function. I eventually got it done with hsv. It works but IMHO, its not an ideal way to do it. I had to be pointed to the color wheel to figure out the color values to enter.

If this feature can be added, it will save the next guy a lot of time and maybe some frustration.

https://www.cssscript.com/demo/hsv-hsl-color-wheel-picker-reinvented/ https://forums.pimoroni.com/t/interstate-74-w-how-do-you-control-the-display-brightness/22591/14

North101 commented 11 months ago

It would be great to have the unicorn's set brightness function ported to the interstate75 and the plasma libraries

Gadgetoid commented 11 months ago

I had a quick glance over the code and it's doable, but I want to avoid a per-pixel brightness multiply if I can help it. In theory it's possible to adjust the brightness by tweaking display timings, but the results may be less than desirable. On my... longtail todo list :grimacing:

alphanumeric007 commented 11 months ago

@Gadgetoid, thanks for taking the time to take a look. I've often found that , what I think would likely be an easy fix, isn't. @helgibbons really helped me out on this one, even after my whining. So, I have a working solution, and no rush. =)

helgibbons commented 11 months ago

Going to leave this one open as a reminder :)

whatleymd commented 1 month ago

+1 for having a global brightness function for I75. Text is doable per the HSV workaround, but images cause temporary vision loss. I'm handling images via hub75 micropython library and painting the image via set_pixel. If you can provide a high level summary of necessary changes required in the c++ library, maybe someone can come along with a PR? Thanks