Add method to control display brightness from display libraries
Closed this issue · 1 comments
echo-lalia commented
A potentially useful feature would be to create a method in both st7789py and st7789fbuf, which could control the display brightness easily.
This could open the door to adding a display brightness setting to the config at a later date, as well.
echo-lalia commented
For MicroHydra 2.0 this should be even easier. We just need to remove backlight control from lib.display.st7789.py
and add it to lib.display.display.py
.
The Display class can take over backlight control with PWM using the device-specific backlight Pin constant.
Then we can add a method for changing the duty cycle for the PWM, probably using a float from 0.0-1.0, or maybe an integer percentage, for user-friendliness (rather than raw duty cycle values)