TFT Led dimming ...

Code tips and tricks for beginners
AndyGadget
Posts: 111
Joined: Mon Feb 15, 2021 1:44 pm
Has thanked: 43 times
Been thanked: 81 times

Re: TFT Led dimming ...

Post by AndyGadget »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sun Sep 05, 2021 8:33 am thank you Zim. I knew I had to use this function. my question was to know if someone already tried different parameters to dim a TFT backlight in order to use the best one... But if no one did it, I will have to make some tests...
The ESP8266 / Annex WiFi 1.43.3 doesn't have the TFT.BRIGHTNESS and I wanted to implement it for one of my ESP8266 projects so I just connected a spare GPIO to the LED pin of the display (I used D8 / GPIO15 on a D1 mini) and use the PWM command with default frequency (1KHz) and it works a treat. Values are 0 to 1023 as opposed to the 0 to 255 of the ESP32 TFT.BRIGHTNESS command.
e.g. PWM(15) = 512 will give approximately half brightness.

NB : Don't use D4 / GPIO2 on a D1Mini as the display transistor looks like a pulldown and the ESP8266 doesn't boot.

(CiccioCB, if you ever do an update to Annex WiFi 1.43.3 how about slipping in the TFT.BRIGHTNESS command :) )
its1000
Posts: 65
Joined: Thu May 20, 2021 6:57 pm
Has thanked: 3 times
Been thanked: 1 time

Re: TFT Led dimming ...

Post by its1000 »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sat Sep 18, 2021 9:21 pm
[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sun Sep 05, 2021 8:33 am thank you Zim. I knew I had to use this function. my question was to know if someone already tried different parameters to dim a TFT backlight in order to use the best one... But if no one did it, I will have to make some tests...
The ESP8266 / Annex WiFi 1.43.3 doesn't have the TFT.BRIGHTNESS and I wanted to implement it for one of my ESP8266 projects so I just connected a spare GPIO to the LED pin of the display (I used D8 / GPIO15 on a D1 mini) and use the PWM command with default frequency (1KHz) and it works a treat. Values are 0 to 1023 as opposed to the 0 to 255 of the ESP32 TFT.BRIGHTNESS command.
e.g. PWM(15) = 512 will give approximately half brightness.

NB : Don't use D4 / GPIO2 on a D1Mini as the display transistor looks like a pulldown and the ESP8266 doesn't boot.

(CiccioCB, if you ever do an update to Annex WiFi 1.43.3 how about slipping in the TFT.BRIGHTNESS command :) )
thank you for those information
Post Reply