adafruit / Adafruit_CircuitPython_IS31FL3731

CircuitPython driver for the IS31FL3731 charlieplex IC
MIT License
22 stars 25 forks source link

Consider adding lightness curve correction to some examples #30

Closed gpshead closed 1 year ago

gpshead commented 4 years ago

The example code for the charlieplexed leds with 0-255 PWM brightness are not corrected for human perception of lightness.

Consider adding that when relevant. In my CharlieWing experience, it makes an antialiased font display such as in the pillow_marquee.py animation easier to read. It may also give that animated gif more definition.

I was about to drop the little code snippet from my project notebook to do that here... but told myself "this really belongs in a common library" as it is useful for LED control of any form. Which at 11pm led me down a Python packaging rabbit hole (note to self: do not do that at 1am). Thankfully, I finally made it out the other side after a night's sleep! Here you go: https://github.com/gpshead/pwm_lightness aka https://pypi.org/project/pwm-lightness/.

That might go further than you want to explain within a tutorial. But I do think people would find it useful. Up to you!

ladyada commented 4 years ago

@gpshead wow nice work! would you like to have this packaged up and distributed in our community bundle for easy circuitpython use? https://github.com/adafruit/CircuitPython_Community_Bundle

@TheKitty ^ good newsy content

gpshead commented 4 years ago

Thanks, including it in the community bundle makes sense to me, it looks like it'd fit well under helpers/

ladyada commented 4 years ago

@kattni can help ya out!

kattni commented 4 years ago

@gpshead Sorry for the delay! We have a guide on getting a library ready for sharing. It includes a few things not relevant to the Community Bundle though, as we have a few more steps for the Adafruit Bundle. The guide is here. We recommend running cookiecutter as suggested in the guide, and formatting your library similar to how we format ours. However, it is not required. If you have any questions, please ping me directly, and we'll get it sorted. If you find a section in the guide that doesn't make sense, let me know, it could be one of the few bits not relevant to the Community Bundle. Thanks!

kattni commented 1 year ago

As this is not an issue with the library, I'm closing it.

If you're still interested in adding this to the Community Bundle, you can always do so! As well, if you have any questions, consider reaching out via Discord in the help-with-circuitpython channel.