Xinyuan-LilyGO / T-Display-S3-AMOLED

An upgraded version of T-Display-S3. It has a high-resolution color screen and more configurable GPIO ports. Enrich your needs.
MIT License
147 stars 30 forks source link

lvgl demo example #11

Closed jrraines closed 6 months ago

jrraines commented 1 year ago

I was able to compile the lvgl demo example and download it. Nothing ever appears on the amoled screen. The serial monitor shows: load:0x3fce3808,len:0x44c load:0x403c9700,len:0xbe4 load:0x403cc700,len:0x2a68 entry 0x403c98d4

assert failed: void setup() lvgl_demo.ino:28 (buf)

Backtrace: 0x4037732a:0x3fcebc90 0x40379ead:0x3fcebcb0 0x4037fe01:0x3fcebcd0 0x42001bda:0x3fcebe00 0x42022bf6:0x3fcebe20

teastainGit commented 1 year ago

Well, it can be tricky. It seems that the libraries have changed recently. It ran fine last week with the old files! But To get it to work today on Arduino IDE I had to re-clone the GitHub repository and overwrite both the lvgl_demo.ino sketch and the lvgl library with the components from the GitHub repository !

Other than that, it compiles and runs. -Terry

jrraines commented 1 year ago

I cloned it on Aug 6. The sprite demo runs fine. I’m not familiar with the assert syntax but even if I comment that out it crashes with a kernel panic. When I cloned it I downloaded the zip from github. I’m not sure how that actually works—maybe the zip was old? I’ll check that idea out. Thanks for your response!

On Aug 8, 2023, at 5:19 PM, Terry Stainton @.***> wrote:

Well, it can be tricky. It seems that the libraries have changed recently. To get it to work on Arduino IDE I had to re-clone the GitHub repository and overwrite both the lvgl_demo.ino sketch and the lvgl library with the components from the GitHub repository ! It ran fine last week with the old files! Other than that, it compiles and runs. -Terry

— Reply to this email directly, view it on GitHub https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED/issues/11#issuecomment-1670383310, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIIQKH6K6F3ZHIFKPOCPU3XUK3PXANCNFSM6AAAAAA3JBOKZI. You are receiving this because you authored the thread.

lewisxhe commented 1 year ago

Turn on PSRAM and set it to OPI

jrraines commented 1 year ago

That sounds like the right answer! But I don’t know how to do it. The Readme seems to show a different version of the Arduino tools menu than I have. Readme shows:

and I have: 

This is Arduino 2.1.1 on a Mac. Poking around in the submenus I don’t see the PSRAM option. Can I set it in setup()?

On Aug 9, 2023, at 6:10 AM, Lewis He @.***> wrote:

Turn on PSRAM and set it to OPI

— Reply to this email directly, view it on GitHub https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED/issues/11#issuecomment-1671126905, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIIQKCO77YCO7SOUJGXHSLXUNV35ANCNFSM6AAAAAA3JBOKZI. You are receiving this because you authored the thread.

lewisxhe commented 1 year ago

What board did you choose? You can choose ESP32 S3 DEV MODULE, for other options, please refer to README

teastainGit commented 1 year ago

Some how I cannot see the 'obj'

Screenshot 2023-08-09 at 1 21 02 PM

The options are here: https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED/blob/main/image/Arduino_Config.png

and you enter them in Arduino IDE here:

Screenshot 2023-08-09 at 1 22 19 PM

-Terry

jrraines commented 1 year ago

Thank you! now it compiles and runs

On Aug 9, 2023, at 12:20 PM, Terry Stainton @.***> wrote:

Some how I cannot see the 'obj' https://user-images.githubusercontent.com/80008504/259493841-5be3595a-0136-466d-bd6e-e377341372f4.png The options are here: https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED/blob/main/image/Arduino_Config.png

and you enter them in Arduino IDE here: https://user-images.githubusercontent.com/80008504/259494698-0fdaf128-52e3-43c9-8323-65488afb941a.png -Terry

— Reply to this email directly, view it on GitHub https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED/issues/11#issuecomment-1671843075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIIQKHGO2YHEKLEPMPWVYTXUPBFJANCNFSM6AAAAAA3JBOKZI. You are receiving this because you authored the thread.

jrraines commented 11 months ago

I started playing with this again. I mostly use the Arduino (2.0+) toolchain. Are there plans to better integrate with that? Proper installation of pins.h in a hardware folder and putting the display into TTF-eSPI’s extensive list of screens in its User folders would greatly improve the compatibility with existing code. I’ve been playing with trying to get Animated Eyes which works on another one of your boards to work and it has been frustrating.

What toolchain are you using?

On Aug 9, 2023, at 3:08 PM, John Raines @.***> wrote:

Thank you! now it compiles and runs

On Aug 9, 2023, at 12:20 PM, Terry Stainton @.***> wrote:

Some how I cannot see the 'obj' https://user-images.githubusercontent.com/80008504/259493841-5be3595a-0136-466d-bd6e-e377341372f4.png The options are here: https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED/blob/main/image/Arduino_Config.png

and you enter them in Arduino IDE here: https://user-images.githubusercontent.com/80008504/259494698-0fdaf128-52e3-43c9-8323-65488afb941a.png -Terry

— Reply to this email directly, view it on GitHub https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED/issues/11#issuecomment-1671843075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIIQKHGO2YHEKLEPMPWVYTXUPBFJANCNFSM6AAAAAA3JBOKZI. You are receiving this because you authored the thread.

teastainGit commented 11 months ago

I am not affiliated with LilyGO! I use Arduino IDE 2.2.1. I keep a copy of 'User_Setup_Select.h ' handy to use after a Arduino IDE library update.

The board works very well for me in LVGL and TFT_eSPI.

Adapting other applications to this board is tricky. I tend to keep things simple and I have an example of the LilyGO T-Display S3 AMOLED for TFT_eSPI that you can use as a base, let me know if you want to see it. -Terry

jrraines commented 11 months ago

That would be helpful!

I have seen some of Volos’ videos which use sprites and I’m puzzled why sprites seem to work better (for me as well as Volos) than TFT-eSPI without sprites. The versions of User_Setup_Select.h I’ve seen have not included the rm67162. Animated Eye doesn’t use sprites.

On Nov 7, 2023, at 10:35 AM, Terry Stainton @.***> wrote:

I am not affiliated with LilyGO! I use Arduino IDE 2.2.1. I keep a copy of 'User_Setup_Select.h ' handy to use after a Arduino IDE library update.

The board works very well for me in LVGL and TFT_eSPI.

Adapting other applications to this board is tricky. I tend to keep things simple and I have an example of the LilyGO T-Display S3 AMOLED for TFT_eSPI that you can use as a base, let me know if you want to see it. -Terry

— Reply to this email directly, view it on GitHub https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED/issues/11#issuecomment-1799133643, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIIQKAV2ILBDOJTRDIRMFTYDJPLJAVCNFSM6AAAAAA3JBOKZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJZGEZTGNRUGM. You are receiving this because you authored the thread.

teastainGit commented 11 months ago

HotHeadAMOLED.zip Note that the rm67162.h and rm67162.cpp are in the sketch folder and the User_Setup_Select.h tells the TFT_eSPi to use the #include <User_Setup.h> // Default setup is root library folder But the ...tells it to use the generic display driver, and the rm67162.h and rm67162.cpp are, as I said, included in your sketch folder. Very simple, works well.

jrraines commented 11 months ago

Thank you! I will see if that helps me make progress.

On Nov 7, 2023, at 12:16 PM, Terry Stainton @.***> wrote:

HotHeadAMOLED.zip https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED/files/13284317/HotHeadAMOLED.zip Note that the rm67162.h and rm67162.cpp are in the sketch folder and the User_Setup_Select.h tells the TFT_eSPi to use the #include // Default setup is root library folder But the ...tells it to use the generic display driver, and the rm67162.h and rm67162.cpp are, as I said, included in your sketch folder. Very simple, works well.

— Reply to this email directly, view it on GitHub https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED/issues/11#issuecomment-1799386820, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIIQKFL5CWVOBUQ6RGFMRDYDJ3GDAVCNFSM6AAAAAA3JBOKZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJZGM4DMOBSGA. You are receiving this because you authored the thread.

jrraines commented 11 months ago

This is probably as good as I’m going to struggle for. It’s not right but way better than where I was before. 

The good thing about trying is that it finally got my head around the idea that TFT doesn’t actually work at all with the display. I had the misconception that it sort of worked instead of just being a wrapper for sprite which implements a bunch of the TFT commands on a RAM buffer, with the lcd_ commands letting you send the RAM buffer to the screen. I was VERY resistant to seeing that! Thanks again for your help!

I’ve played with uncanny eyes in a number of forms over the years, using it on a raspberry pi, teensy, MonsterM4sk, etc. 55 years ago, in high school, we spent about 2 weeks looking at polar coordinates. If we’d spent a whole semester on that I’d have probably gotten a failing grade. So I’ve never been able to wrap my head around the geometry involved.

What I suppose would be most helpful for TFT would be to find an implementation with QSPI...

On Nov 7, 2023, at 12:35 PM, John Raines @.***> wrote:

Thank you! I will see if that helps me make progress.

On Nov 7, 2023, at 12:16 PM, Terry Stainton @.***> wrote:

HotHeadAMOLED.zip https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED/files/13284317/HotHeadAMOLED.zip Note that the rm67162.h and rm67162.cpp are in the sketch folder and the User_Setup_Select.h tells the TFT_eSPi to use the #include // Default setup is root library folder But the ...tells it to use the generic display driver, and the rm67162.h and rm67162.cpp are, as I said, included in your sketch folder. Very simple, works well.

— Reply to this email directly, view it on GitHub https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED/issues/11#issuecomment-1799386820, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIIQKFL5CWVOBUQ6RGFMRDYDJ3GDAVCNFSM6AAAAAA3JBOKZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJZGM4DMOBSGA. You are receiving this because you authored the thread.

nikthefix commented 10 months ago

The demo uses a full screen sprite as a frame buffer as TFT_eSPI does not support rm67162 directly. This is a good workaround for any unsupported display as long as you have a separate low level driver which can push raw pixels to the screen. So you compose your graphics by drawing to the sprite frame buffer rather than the usual TFT_eSPI display selection (which is now irrelevant). This opens up loads of options for using newer or more unusual displays with TFT_eSPI - as long as you have the driver, the init codes, the display pixel width & height and plenty of PSRAM. This frame buffer approach is what makes LVGL so hardware versatile - even if TFT_eSPI is not used anywhere in the pipeline.

jrraines commented 10 months ago

It took me a long time to ‘get’ that. I still don’t really feel like the screen rotation things (both sprite and rm67162 have commands) work in a way I intuitively understand. And I think what is wrong with uncanny eyes in the code I included has to do with piecemeal updates of the screen vs. sending it all at once. As I said, uncanny eyes is code I don’t fully understand.

Anyway, once I understood that #include TFT_eSPI.h did not mean the same thing I expected it to mean, the display is quite usable and I’ve had fun with it.

On Dec 6, 2023, at 1:10 AM, nikthefix @.***> wrote:

The demo uses a full screen sprite as a frame buffer as TFT_eSPI does not support rm67162 directly. This is a good workaround for any unsupported display as long as you have a separate low level driver which can push raw pixels to the screen. So you compose your graphics by drawing to the sprite frame buffer rather than the usual TFT_eSPI display selection (which is now irrelevant). This opens up loads of options for using newer or more unusual displays with TFT_eSPI - as long as you have the driver, the init codes, the display pixel width & height and plenty of PSRAM.

— Reply to this email directly, view it on GitHub https://github.com/Xinyuan-LilyGO/T-Display-S3-AMOLED/issues/11#issuecomment-1842211465, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIIQKHM2USOPBBCIDF27YDYIALAHAVCNFSM6AAAAAA3JBOKZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBSGIYTCNBWGU. You are receiving this because you authored the thread.

github-actions[bot] commented 6 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 6 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.