Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setbacklight() function can not control LCD's backlight #66

Open
be-engineer opened this issue Feb 3, 2020 · 1 comment
Open

setbacklight() function can not control LCD's backlight #66

be-engineer opened this issue Feb 3, 2020 · 1 comment

Comments

@be-engineer
Copy link

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?

@blkhawk
Copy link

blkhawk commented Nov 19, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants