juj / fbcp-ili9341

A blazing fast display driver for SPI-based LCD displays for Raspberry Pi A, B, 2, 3, 4 and Zero
MIT License
1.55k stars 258 forks source link

Brightness control with ili9341 screen #231

Open TurboNewb opened 2 years ago

TurboNewb commented 2 years ago

Just curious, I was wondering if there is any possible way to control the brightness of a ili9341 screen either from software or using a potentiometer?

Thanks.

juj commented 2 years ago

Brigthness is generally controlled by voltage levels. You can try adjusting the display controller registers at https://github.com/juj/fbcp-ili9341/blob/486a32e7f23b41d49b0e9da4845a86709f6f9c8a/ili9341.cpp#L45 . Check the datasheet for possible values.

superpieboy commented 2 years ago

Hi, do you know how to control vcom1 & vcom2 with python script from GPIO ? thanks

TurboNewb commented 2 years ago

not sure how to do that but I hope someone knows, would be handy to adjust screen brightness with buttons. especially playing in the dark.