When I use ESP32 Dev module to control TFT LCD ILI9225, I found that setbacklight() and setBacklightBrightness() can not work, backlight pin still remain LOW. Then I found out the following code in the setbacklight () function in the TFT_22_ILI9225.cpp file by debugging the code
# ifndef ESP32
if (_led)
analogWrite (_led, blState? _brightness: 0);
# endif
When I commented out #ifndef ESP32 statement, setbacklight () worked normally.I don't know why add these two pre-coniles codes?
I think analogWrite depends on what libraries you include on ESP32. I had to include https://github.com/ERROPiX/ESP32_AnalogWrite for it to work normally.
Maybe this could be reflected in a comment there?
When I use ESP32 Dev module to control TFT LCD ILI9225, I found that setbacklight() and setBacklightBrightness() can not work, backlight pin still remain LOW. Then I found out the following code in the setbacklight () function in the TFT_22_ILI9225.cpp file by debugging the code # ifndef ESP32 if (_led) analogWrite (_led, blState? _brightness: 0); # endif When I commented out #ifndef ESP32 statement, setbacklight () worked normally.I don't know why add these two pre-coniles codes?