T-Display-S3-Long icon indicating copy to clipboard operation
T-Display-S3-Long copied to clipboard

So many issues...

Open d3mac123 opened this issue 1 year ago • 61 comments

Hi, just got my S3-Long. I followed all the instructions for the Arduino IDE Quick Start. As the instructions are not that clear,

(step 2) after installing the Arduino ESP32 (is the Arduino_ESP32_OTA the right one?), (steps 3) I unzipped the downloaded file (the entire github from https://github.com/Xinyuan-LilyGO/T-Display-S3-Long/tree/master), and I copied it to my Documents\Arduino\libraries folder (step 4) I copied the lib folder to my Documents\Arduino\libraries folder as well - shouldn't this be copied to \Library\Arduino15\libraries (just in case, I did it too) (step 5) Lastly, I configured the Tools as specified.

Issues: (step 6) The T-Display-S3-Long does NOT show in File->Examples->... (step 7) The board does not show in some of my USB ports. However, I made it to work in one port at least (step 8) I manually copied the touch example and uploaded it to the board - the display does not show anything (all black) but I could capture the touch via serial monitor;

No other example worked - I tried Step 9 several times.

Questions are:

  • What am I missing?
  • Can the board run code using the TFT_eSPI library?

d3mac123 avatar Nov 07 '23 02:11 d3mac123

Hi, just got my S3-Long. I followed all the instructions for the Arduino IDE Quick Start. As the instructions are not that clear,

(step 2) after installing the Arduino ESP32 (is the Arduino_ESP32_OTA the right one?), (steps 3) I unzipped the downloaded file (the entire github from https://github.com/Xinyuan-LilyGO/T-Display-S3-Long/tree/master), and I copied it to my Documents\Arduino\libraries folder (step 4) I copied the lib folder to my Documents\Arduino\libraries folder as well - shouldn't this be copied to \Library\Arduino15\libraries (just in case, I did it too) (step 5) Lastly, I configured the Tools as specified.

Issues: (step 6) The T-Display-S3-Long does NOT show in File->Examples->... (step 7) The board does not show in some of my USB ports. However, I made it to work in one port at least (step 8) I manually copied the touch example and uploaded it to the board - the display does not show anything (all black) but I could capture the touch via serial monitor;

No other example worked - I tried Step 9 several times.

Questions are:

  • What am I missing?
  • Can the board run code using the TFT_eSPI library?

Sorry for the error in the previous Readme, now I have changed the new readme; The right thing to do is:

  1. Download the “S3-Long” project
  2. copy the entire “ S3-Long/lib” folder to the arduion Lib (e.g. C:\Users\YourName\Documents\Arduino\libraries)
  3. open any one with Arduion IDE “S3-Long/examples/XXX XXX. Ino”
  4. Select ESP32S3 Dev Module and port
  5. Click "upload" button to update the code to the board

ShallowGreen123 avatar Nov 08 '23 05:11 ShallowGreen123

Hi d3mac123,

If you're still having problems then I suggest backtracking a bit and starting with the TFT demo in the Examples folder. Open it directly from the folder. Since this demo does not require anything to be copied to your Arduino Lib folder or use any screen rotation (it's in portrait mode) it should work out-of-the-box as it did for me. At least this will allow you to test the display hardware. You already know that touch is working from your previous experiments.

The other examples took a bit more work for me as I needed to use the latest LVGL version (not the supplied LVGL configuration) and the latest 5.xx IDF Arduino ESP32 iteration. Both have been recently updated and in some cases there are breaking changes which affect example code supplied with new boards. The dust will settle soon I'm sure but it must be difficult for Lilygo and others when the goalposts keep changing. I'll post some code mods here asap. I only got the board yesterday so I'm experimenting too.

nikthefix avatar Nov 17 '23 10:11 nikthefix

Nik, thanks for the help. Yes, I got the examples to work but, as of now, the board is in "waiting mode" :) I have wrote more than 1000 lines of code using the TFT_eSPI library and I cannot transfer the work to the Long version. I have tried the library you made for Volos' AMOLED S3 but it did not work so, until you do your magic, I am not using the Long version.

Thanks again!

d3mac123 avatar Nov 17 '23 15:11 d3mac123

Hi again. Yes the AMOLED code won't work with the Long as it uses a TFT driver even tho both are set up for QSPI by default. So am I right in thinking that you would want to use the Long in landscape mode with TFT_eSPI? I also received their 2.41" AMOLED T4 this morning. Very nice hardware. It has similar software versioning issues (at least on my computers).

nikthefix avatar Nov 17 '23 16:11 nikthefix

You are right (my project requires landscape mode with the TFT_eSPI).

I have to check yet the T4 but, unfortunately, it doesn't fit the space I have in my panel - the Long fits like a glove).

Alex Souza On Nov 17, 2023 at 11:56 AM -0500, nikthefix @.***>, wrote:

Hi again. Yes the AMOLED code won't work with the Long as it uses a TFT driver even tho both are set up for QSPI by default. So am I right in thinking that you would want to use the Long in landscape mode with TFT_eSPI? I also received their 2.41" AMOLED T4 this morning. Very nice hardware. It has similar software versioning issues (at least on my computers). — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

d3mac123 avatar Nov 17 '23 17:11 d3mac123

Hi d3mac123,

I will upload some new demo code here in a couple of days. Could you try it and give me some feedback if you get a moment? It's only for the Long in landscape / TFT_eSPI V2.5.34 / Arduino ESP32 V3.0.0-alpha2 as I haven't tested it with other versions. No lvgl. It's stripped right back so is not a drop-in replacement for the supplied libs. I'm just tidying it up a bit right now.

BTW, the issues you were having with 'GPIO output gpio_num error' are due to updates in alpha1/2. TFT_eSPI in sprite only mode does not fall prey to these problems it seems. But Bodmer is sure to release an update soon so who knows what else may change. Hopefully nothing in the Sprite department.

nik

nikthefix avatar Nov 29 '23 09:11 nikthefix

Sure thing. Looking forward to that!

Alex Souza On Nov 29, 2023 at 4:35 AM -0500, nikthefix @.***>, wrote:

Hi d3mac123, I will upload some new demo code here in a couple of days. Could you try it and give me some feedback if you get a moment? It's only for the Long / TFT_eSPI V2.5.34 / Arduino ESP32 V3.0.0-alpha2 as I haven't tested it with other versions. It's stripped right back so is not a drop-in replacement for the supplied libs. I'm just tidying it up a bit right now. nik — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

d3mac123 avatar Nov 29 '23 13:11 d3mac123

Hi d3mac123,

Not a demo but a hello world. Maybe a good starting point. I'll pull something a bit more useful asap. No touch in this. But you've got that covered anyway.

Please read the comments in the sketch as there's a lot to talk about.

TFT_Long_eSPI_hello_world.zip

nikthefix avatar Nov 30 '23 16:11 nikthefix

Much of what remains in my driver mod is redundant if you're using TFT_eSPI. I just need to trim it down a bit more. DMA is not used for buffer > display xfer as it was problematic with alpha2 but I'll stick it back in as soon as it works.

The soft rotate yields a performance less than half of what you would get pushing pixels to portrait. Such is life but it's not that bad. As the rotate is buffered the screen draw is fast if called intermittently. Animations will suffer however.

nikthefix avatar Nov 30 '23 16:11 nikthefix

I tried the code with my current setup (Esp32 2.0.14 and TFT_eSPI 2.5.34), and it worked fine (thank you!).

As I am working with the board with the USB port on the left side (using the lcd_setRotation(2);), I will work on the touch part now (as touching the bottom right of the screen is giving me coordinates x=0,y=180, instead of the right ones, which should be x=640,y=180).

Please keep me posted on your improvements. Your work is really appreciated!

d3mac123 avatar Nov 30 '23 18:11 d3mac123

The greatest optimization in terms of screen refresh will come from identifying which elements of the sprite are updated and only pushing those regions to lcd_PushColors_rotated_90. At present the whole display is refreshed which is grossly inefficient.

This will make all the difference considering that we're already compromised having to use a soft rotate.

There is also a hardware accelerated colour fill (which I will implement) that allows a mega fast clear screen along with various test patterns. The datasheet is actually very interesting.

All the best.

nik

nikthefix avatar Nov 30 '23 18:11 nikthefix

@nikthefix I have noticed a glitch in the top right side of the display (see pictures). Basically, some lines that are not in the code have been drawn over the green circle. I saw it also with different code (that area is always "glitching some lines").

Something for you to double-check? display_glitch.zip

d3mac123 avatar Dec 01 '23 19:12 d3mac123

It sounds like the rotate buffer is overflowing. Increase

uint16_t* qBuffer = (uint16_t*) heap_caps_malloc(203400, MALLOC_CAP_SPIRAM ); //psram buffer for matrix rotation (640 * 180 * 2)

from 203400 to 230400 as this is the exact size of the TFT_eSPI sprite buffer.

I will try to reproduce the glitch.

nikthefix avatar Dec 02 '23 08:12 nikthefix

Hi again. It turns out it was a typo. 203400 should have been 230400 (600 x 180 x 2). I accidentally switched the 3 and 0. My bad.

nikthefix avatar Dec 02 '23 08:12 nikthefix

Updated AXS15231B.cpp line 6: AXS15231B.zip

nikthefix avatar Dec 02 '23 09:12 nikthefix

It works fine! Thanks!

d3mac123 avatar Dec 02 '23 20:12 d3mac123

@nikthefix (please let me know if you prefer to start a new thread elsewhere). I have noticed that when using the WifiManager library, my board keeps restarting the setup function. Everything works fine in the regular T-Display board but not with the Long. Any ideas?

d3mac123 avatar Dec 07 '23 22:12 d3mac123

@d3mac123 Someone else mentioned this in regards to a different board (RGB parallel display) and I also noticed it with the new T4-Amoled. I'll look into it.

Perhaps try integrating the WifiManager into one of Volos demos for the T-Display-Amoled. If it works then we can rule out any compatibility issues with WifiManager / PSRAM / QSPI display / DMA / Arduino ESP32 version.

Also, maybe try wifi provisioning before you run the display init code or assign display buffers. If in doubt isolate.

I'll migrate all these bits and bobs and some new things to my github. I'll let you know when there's something to see then we can talk there.

nikthefix avatar Dec 08 '23 09:12 nikthefix

I will keep checking here (unfortunately, I do not have any Amoled boards to test). I have tried already (same results) calling line axs15231_init(); before and after doing the wifi provisioning.

d3mac123 avatar Dec 08 '23 18:12 d3mac123

@d3mac123

Hello again.

How's it going with the Long? I've been working with Volos on a new touch demo for the Long and I think he will publish a video and code in the next day or so. Watch his space. I think it will be good. ....Although you've probably taken things a lot further with your own work already.

I've also added fast partial updates for LVGL projects - compatible with alpha 3 and below. I'm just integrating those changes to work with TFT_eSPI so we can have fast animations there too. I will post on my github and here.

All the best,

nik

nikthefix avatar Dec 19 '23 10:12 nikthefix

Hi. Please tell me how to setup lvgl? I'm having lot's of problems compiling the factory.ino file for T-Display-S3-Long. Please help

momosh13 avatar Dec 19 '23 10:12 momosh13

Hi momosh13,

Try the attached sketch and see if it works. The buttons do nothing at the moment.

Use a fresh LVGL with mods to lv_config as described in the sketch. If it works OK then maybe transfer the mods and libs to the lilygo factory example as substitutes.

tft_long_lvgl_odometer.zip

nikthefix avatar Dec 19 '23 10:12 nikthefix

Thank you for the reply. the lvgl is 8.3.0 yes?

momosh13 avatar Dec 19 '23 10:12 momosh13

8.3.11 for my tests. But it's important NOT to use the lilygo supplied libs as they have been modified and will not work with my code. It's not their fault. The Arduino_ESP32 core updated recently and there were many breaking changes.

If you're using alpha3 then you'll need a workaround for PWM to control back-light brightness as this is not working at present but you can do it manually with a timer.

In my demo the backlight is just set to fully on.

nikthefix avatar Dec 19 '23 10:12 nikthefix

Thanks for the updates @nikthefix . Project is on hold waiting for the touch example but also due to the network issues I mentioned in another post (board keeps resetting while using the Wi-Fi Manager library).

I'm looking forward for Volo's example!

d3mac123 avatar Dec 19 '23 13:12 d3mac123

Yeah that's definitely not your fault. The wifi manager is not working for me either. Trying to find a work around.

Further updates may be found here:

https://github.com/nikthefix?tab=repositories

But I'll stick them here too for the time being.

I'll make the TFt_eSPI repo public as soon as Volos releases his video - just in case he wants to change some stuff at the last moment.

Is everything else working? GUI, touch etc? The touch 'double tap' problem you reported should be solved in the upcoming Volos code. Let me know. It should be as we worked hard to get touch working in alpha1/2/3

The pictures you sent of your interface looked really good.

nik

nikthefix avatar Dec 19 '23 14:12 nikthefix

Thanks for the words (and everything else you are doing!). I am already following your repository.

I am converting a repeater (via UDP) from an airplane engine monitor and attitude indicator (plus the checklist part) app that I built with the original T-Display S3 to the Long version. I am looking forward to seeing the larger display working.

IMG_5309 Large IMG_5308 Large

d3mac123 avatar Dec 19 '23 18:12 d3mac123

Looks great! Watch this space.

nik

nikthefix avatar Dec 19 '23 19:12 nikthefix

8.3.11 for my tests. But it's important NOT to use the lilygo supplied libs as they have been modified and will not work with my code. It's not their fault. The Arduino_ESP32 core updated recently and there were many breaking changes.

If you're using alpha3 then you'll need a workaround for PWM to control back-light brightness as this is not working at present but you can do it manually with a timer.

In my demo the backlight is just set to fully on.

Thank you for your help, finally your sketch working good on T-Display-S3-Long, but the factory sketch not working, I have this error : "text section exceeds available space in board" when Partition Scheme on Default 4MB. When I'm changing the Partition Scheme to 16M Flash / FATFS, NO more error but the screen stays black, no image, Please help me to fix this.

momosh13 avatar Dec 20 '23 03:12 momosh13

The screen showing this

IMG_2677

momosh13 avatar Dec 20 '23 03:12 momosh13