1

I am running out of intelligence trying to control a Lolin 2.4 Inch TFT shield. I connected the shield via the official TFT connector to a Lolin D32 Pro. I am using the ILI9341 libary from Adafruit. With the libary it is no porblem controlling the display. Unfortunately, as soon as I put the esp32 into Deep Sleep, the display goes white but the background illumination stays on. Does someone know, how I can trun off the background illumination? As far as I understood, the background light is not controlled via the ILI9341. Instead I tried putting the GPIO32 on Low, since accoring to the schema of the Lolin TFT cable it is responsible for the TFT_Led enter image description here Unfortunately that does not work either

3
  • forget about sleep for now ... focus on IO32 ... set to HIGH, wait a second, set to LOW, wait a second ... see what happens ... also, try to find a datasheet for the Lolin 2.4 Inch TFT shield
    – jsotola
    Commented Nov 26, 2020 at 18:36
  • i did a search duckduckgo.com/?q=Lolin+2.4+Inch+TFT+shield+schematic ... the first hit points to wemos ... hit comes back as "not found" ... examined URL and found a mis-selling ... corrected mis-selling in the URL and got a good webpage that contains a schematic
    – jsotola
    Commented Nov 26, 2020 at 18:52
  • @jsotola Sorry for not answering earlier. Thanks a lot for your help!
    – Max Amende
    Commented Dec 2, 2020 at 13:34

1 Answer 1

1

The backlight of this shield is ON as long as there's power on the 3.3V pin, unless you make GPIO 32 an output and pull it low.

In deep sleep, however, GPIO 32 will stop acting as a pulled down output pin but the esp32 keeps its 3.3V output pin powered, so the backlight will switch ON.

You could power the display over a mosfet, controlled by a GPIO.

1
  • Thanks for your help! It works now. If someone else with mediocre coding skills read this question in the future. All you need to do is to put in the setup: pinMode(32, OUTPUT); and when you want to use the screen put: digitalWrite(32, HIGH); in front of it and digitalWrite(32, LOW); after it to disable the screen
    – Max Amende
    Commented Dec 2, 2020 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.