-
Notifications
You must be signed in to change notification settings - Fork 15
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
So many issues... #1
Comments
Sorry for the error in the previous Readme, now I have changed the new readme;
|
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. |
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! |
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? |
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: ***@***.***>
|
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? 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 |
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: ***@***.***>
|
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. |
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. 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. |
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! |
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 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? |
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. |
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. |
Updated AXS15231B.cpp line 6: |
It works fine! Thanks! |
@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 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. |
I will keep checking here (unfortunately, I do not have any Amoled boards to test). I have tried already (same results) calling line |
Hello again. How's it going with the Long? I've also added fast partial updates for LVGL projects - compatible with alpha 3 and below. All the best, nik |
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. |
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. |
Thank you for the reply. the lvgl is 8.3.0 yes? |
8.3.11 for my tests. 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. |
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! |
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 pictures you sent of your interface looked really good. nik |
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. |
Looks great! nik |
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. |
The factory demo needs the supplied lilygo modified libs. Unfortunately these mods don't seem to be working with any of the esp-arduino cores that I've tried (2.5 to alpha3). I've started reworking the demo to use alpha3 and standard lvgl. You can try what I've done so far. The wifi stuff is commented out so the clock won't flip yet as there's no ntp time reference. #define LV_USE_MSG 1 in lv_conf.h line 706 in addition to the other lv_config changes you made before. |
Thank you. but I still getting this: Sketch uses 1312829 bytes (100%) of program storage space. Maximum is 1310720 bytes. Compilation error: text section exceeds available space in board |
Check flash size and partition setting in build options. Should be: You should see: Sketch uses 1482237 bytes (47%) of program storage space. Maximum is 3145728 bytes. |
yes, you're right, now is (41%) of program storage space, but now I'm back to the original problem, as soon as I'm choosing Partition Scheme 16M flash (3M APP/9.9MBB FAT FS) the screen gouse black, no picture |
Check psram is set to OPI. |
I'll put future updates at https://github.com/nikthefix Raise further issues there if that's OK with you. Volos will publish his new video today at 12 noon UK time. I will make those files public at that time. I didn't want to release anything before his video went out. |
Please, fix the factory file, I really like that clock, Volos says you are a genius, only you can do it. |
@momosh13 I really like that clock too! I will work on it today. With the zip I posted, did you get the initial 00:00:00 clock appear even if it didn't flip? |
no, no lock with ESP32 3.0.0 |
OK well we just need to compare your setup with mine. For the flip clock: ESP32 3.0.0 alpha3 via board manager. (https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json) LVGL 8.3.11 via library manager. XpowersLib 0.2.1 via library manager. Remove anything you might have installed from the original supplied lilygo support files. Board ESP32-S3-Dev Check lv_conf.h options: Line 15 - #if 1 (Set it to "1" to enable content) I have the clock factory demo working now with the above setup (zip attached). I've not tested the power manager yet and the wifi-auto-config is disabled at the moment. But the clock flips and tells time - at least it does here! :) Let me know if it works for you. |
Thank you for your help. Only odometer works perfectly here, with 16M Flash(3MB APP/9.9MB FATFS) or 4MB, the flip_clock_long and the factory not working, when Partition Scheme is 4MB says file is too large, when Partition Scheme is 16M or 32M screen goes Black. IMG_2685.MOV |
Also, see if there's anything here which might help. nikthefix/Lilygo_Support_T_Display_S3_Long_TFT_eSPI_Volos-nikthefix#1 |
Hi
IMG_2757.MOV |
Happy New Year to you too! Glad you got it working. Yes the 32MHz is too fast for this display when you are not using disp_drv.full_refresh. As for the distortion, this is caused by the display only accepting 'even' partial update regions. You will see corruption if you update a sub-region of odd numbered width or height. If you look at my odometer demo and find the callback 'my_rounder', this is a routine which quantizes regions to the nearest even numbers and should solve the problem in LVGL with the Long. Just import the callback to your original factory demo and add: disp_drv.rounder_cb = my_rounder; to the driver setup parameters. My updated version of the flip clock demo has this implemented already. |
BTW, my updated version of the flip clock demo is at my github: |
Thank you nikthefix !!! |
Nice one! nik |
Hi. IMG_2786.MOV |
Yes it should be possible to adjust the format. I'll try it tomorrow and get back to you here. nik |
Hi again. Regarding 12hr format for the flip clock... In factory_gui.cpp,
At least this way you don't have to modify any libs and your code will work even if you change your time reference (such as, maybe in future you'd prefer to use a RTC or GPS). nik |
You did it !!! |
@momosh13 Good . I will add it to my github. Thanks for pointing it out. |
Hi nikthefix 1b 00 a0 24 08 16 0a d7 ff ff 00 00 00 00 09 00 00 03 00 17 00 02 03 53 00 00 00 00 40 00 40 48 48 40 00 00 40 00 00 40 00 00 40 00 00 40 00 00 40 00 00 40 00 00 40 00 00 40 00 00 40 00 08 48 08 08 48 08 00 40 00 08 48 08 00 40 00 08 48 08 00 40 00 00 40 00 00 40 00 00 40 00 00 40 00 00 40 00 08 48 08 00 40 00 00 40 00 00 40 48 to (Vendor Specific) USB Device. I got the HEX, by sniffing communication between Windows control software and the device, with Wireshark. |
@momosh13 https://circuitsathome.com/usb-host-shield-for-arduino-pro-mini/ There are cheap clones of the 'mini' circuits at home design version which are slightly different in the power delivery department. A small hardware mod is necessary to bring the clones in-line with the original. Details can be found here: https://geekhack.org/index.php?topic=80421.0 What does the vendor specific device enumerate as in your computer device manager? I have the host shield working fine with the CDC USB of my laser cutter GRBL controller, and I've had it working well with keyboard / mouse and also FTDI. These host boards are usually limited to driving only devices catered for in the libraries - CDC, keyboard, joystick, MSD etc. I suspect that your device is USB-HID generic. If so then that's a good thing. I suggest initially testing your hardware by trying the USB Keyboard profile - just to make sure that the 500ma power requirements are met, or at least sufficient to drive your device (assuming it's bus powered). The ESP32-S3 can also act as host natively - bypassing the need for SPI comms. https://github.com/tanakamasayuki/EspUsbHost I've been using this solution myself and it's neat as it uses no extra hardware. You just need a dev board with 2 usb ports and a wire jumper to bridge 5v to the host port and a USB OTG cable. nik |
Thank you for reply and with https://github.com/PaulStoffregen/USBHost_t36 library, example HIDDeviceInfo whit this one, https://github.com/felis/USB_Host_Shield_2.0 library, exsample USB_desc, i'm geting this So, my problem is, i don't now how to send the HEX command to my device, i have no idea. About the HEX in the previous post. |
OK all that info really helps. First I'd try the Teensy setup and run the example: https://github.com/PaulStoffregen/USBHost_t36/tree/master/examples/RawHID/RawHIDtoUSBHostRawHID Copy the VID and PID from your HIDDeviceInfo dump into the example sketch and start experimenting with Report Descriptors from there. Here's a useful tool for Windows which will allow you to test data strings to confirm functionality: I think it's important to establish working HID comms between PC and Device using the HID terminal before migrating to the MCU as it'll probably save a lot of time in the end. You'll probably also need vendor specific documentation for your device Report Descriptor format. This is not revealed in the HIDDeviceInfo dump so it's guesswork unless it's class compliant or you have documentation. Can I ask what the HID device product is? We should move this chat as it's not a Lilygo topic. I'll add a repo on my github (https://github.com/nikthefix). Let's carry on there. nik |
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:
The text was updated successfully, but these errors were encountered: