HyperPixel Brightness Control

How can I control the brightness of my HyperPixel display from within Python. Also how can I read what the current brightness setting is in Python? I found a few hits but they are old most say that they don’t work.

Thanks

Mick

JFYI, I don’t own one.
I don’t think you can? I don’t see any reference to Python code on it’s GitHub page.
GitHub - pimoroni/hyperpixel4: Driver for the Pimoroni HyperPixel 4.0" Touchscreen Display · GitHub

It uses DPI via the GPIO Header. It looks like the backlight control uses GPIO 19. I’m guessing PWM?
Hyperpixel4 at Raspberry Pi GPIO Pinout

Best guess is if you can get / take control of that pin, you could use PWM to control the backlight.

Thanks for the reply. I didn’t know how to do what you suggested so did some research. In the end I asked ChatGPT, that said that for HyperPixel 4.0 the only option is on/off

Off - echo 0 | sudo tee /sys/class/backlight/backlight/brightness

On - echo 1 | sudo tee /sys/class/backlight/backlight/brightness

Cheers

Mick