Xinyuan-LilyGO / T-Display-S3

MIT License
782 stars 195 forks source link

LCD backlight seems dead after a week of use #66

Closed p-ryals closed 1 year ago

p-ryals commented 1 year ago

Everything was working fine with the old Arduino IDE (v1.8.13). I decided to give v2.0.3 a try, added the libraries and got everything ready, compiled and uploaded the exact same code, and the LCD turned off. I do have the power line enabled:

define LCDpin 15

void setup(void) { pinMode(LCDpin, OUTPUT); digitalWrite(LCDpin, HIGH);

I troubleshooted for a while, but nothing worked, so I went back to the previous version of the Arduino IDE and uploaded the code I know works, and the LCD is still off.

Serial comms work fine, and everything else seems fine as well. I've been using Serial.println() at different places to verify, and everything is running. Only the LCD is off. I triple checked my board settings. I tried holding the boot button before plugging it in, flashing, and then un/replugging. I even erased all flash, just to see if that would have an effect.

I can't think of any reason using the newer Arduino IDE would make this happen, but it seems a little too coincidental that it happened to occur the very first time I uploaded from v2.0.3.

Can you think of any reason for it? Is there a known bug? Do I need to burn a new firmware or something?

EDIT: I added the following:

ledcSetup(0, 2000, 8); ledcAttachPin(PIN_LCD_BL, 0); ledcWrite(0, 255);

This got the backlight to turn on, at least, but there's still nothing being displayed. My only guess at this point is either v2.0.3 uploaded some generic firmware without my knowledge on the first run (which seems unlikely) or that the LCD is simply toast.

I'd love some ideas, if anyone can think of anything!

teastainGit commented 1 year ago

If you are still having trouble...maybe send me your program and I'll try it on one of my boards? teastain@me.com Cheers, Terry

mmMicky commented 1 year ago

The new version IDE will check and ask you to update the current library version every time it is opened. Because TFT_eSPI does not support T-Display-S3 natively. It can be used normally only after I modified it. Once updated it becomes invalid. What you need to do is to re-copy the TFT_eSPI library to the lib directory or use the Arduino_GFX driver library.

p-ryals commented 1 year ago

@mmMicky That was it! I can't believe I didn't think to check that.

Interestingly, even thought I told it not to update the lib, it apparently did it anyway. I just tried it again, and it did the exact same thing. What a pain!

Thank you so much!