Support ILI9488 Display 3.5" Espeasy

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
pp1wvc
Normal user
Posts: 38
Joined: 06 Jan 2023, 12:02
Location: Brazil

Support ILI9488 Display 3.5" Espeasy

#1 Post by pp1wvc » 10 Sep 2023, 13:20

I couldn't get the 3.5" ILI9488 display to work with espeasy.
I saw that this feature is disabled by default, I enabled it and according to the logs, it is being initialized.
The display was successfully tested with Bodmer's TFT_eSPI library so the wire connections are correct and working.
What can I test to make this display work with espeasy?
Attachments
Logs Init.png
Logs Init.png (92.83 KiB) Viewed 3997 times
Pinout Monitor Diagram.png
Pinout Monitor Diagram.png (3.54 MiB) Viewed 3997 times
Pinout Monitor Diagram.jpg
Pinout Monitor Diagram.jpg (1022.05 KiB) Viewed 3997 times
Configurações.png
Configurações.png (83.82 KiB) Viewed 3997 times
Configurações 03.png
Configurações 03.png (60.88 KiB) Viewed 3997 times
Configurações 02.png
Configurações 02.png (69.05 KiB) Viewed 3997 times

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Support ILI9488 Display 3.5" Espeasy

#2 Post by Ath » 10 Sep 2023, 13:51

Next time please make screenshots of only parts that contain relevant text, not of the unused white areas, as that makes the images nearly unusable.

I couldn't get my hands on such display (for a reasonable price), and they aren't used that much, AFAICS, so I couldn't test it and didn't enable these.
I have used parts of Bodmer's library to get some of the displays working, but without hardware to actually try it, this didn't make it (yet).

Did you also enable support in the lib/Adafruit_ILI9341/Adafruit_ILI9341.h file? Changing that in P095_data_struc.h isn't enough to enable that, the ILI9341 library is compiled semi-independent from the ESPEasy sources, so enabling a #define isn't 'seen' there. :idea:
/Ton (PayPal.me)

pp1wvc
Normal user
Posts: 38
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: Support ILI9488 Display 3.5" Espeasy

#3 Post by pp1wvc » 10 Sep 2023, 14:07

Great, let's get this display working and approved. You're right, it was disabled in the Adafruit_ILI9341.h file, it was the only one I didn't review. I'm recompiling it again now and will test it. :)

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Support ILI9488 Display 3.5" Espeasy

#4 Post by TD-er » 10 Sep 2023, 14:12

Not sure if it is a problem, but you have assigned GPIO 18 twice.
Maybe worth to check?

Also see: https://espeasy.readthedocs.io/en/lates ... e-on-esp32
GPIO 4 has a pull-down resistor and GPIO-15 a pull-up.
Maybe you can try different pins to see if this makes a difference?
If so, then our code may require some extra init steps to overcome these default pin states.

You could also try to set the pin bootstate of those pins to states required (e.g. output high for the RST pin) as the boot state is being set before the tasks are initialized.
Maybe the display needs the RST being cleared for a bit longer before it can properly be initialized.

pp1wvc
Normal user
Posts: 38
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: Support ILI9488 Display 3.5" Espeasy

#5 Post by pp1wvc » 10 Sep 2023, 15:20

Recompile carried out successfully, and it didn't work :(,. Replaced GPIO 04 to 25 and GPIO 15 to 13, it didn't work. I raised the RST to high level, without any success. :(

pp1wvc
Normal user
Posts: 38
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: Support ILI9488 Display 3.5" Espeasy

#6 Post by pp1wvc » 10 Sep 2023, 16:23

Tested with Bodmer's TFT_eSPI library and it worked perfectly, I just had to change the GPIO in User_Setup, which really indicates that it is something with Espeasy and the adapted library. :(

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Support ILI9488 Display 3.5" Espeasy

#7 Post by Ath » 10 Sep 2023, 16:25

Maybe I didn't use the correct initialization code, but only added the required code(s).

I've ordered an ILI9488 display (4" with touch) to see if I can get it working, like I got the other models working. Will take a few weeks to arrive, so I hope you're not in a hurry.
/Ton (PayPal.me)

pp1wvc
Normal user
Posts: 38
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: Support ILI9488 Display 3.5" Espeasy

#8 Post by pp1wvc » 10 Sep 2023, 16:49

Thank you TON for your help, I sent via PAYPAL the amount equivalent to three 4.0" touch screens from aliexpress, I hope you like it. Thank you very much. :)

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Support ILI9488 Display 3.5" Espeasy

#9 Post by Ath » 10 Sep 2023, 16:57

Thank you very much, you make me blush :oops:
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Support ILI9488 Display 3.5" Espeasy

#10 Post by Ath » 19 Sep 2023, 20:00

I will have to re-order from a different Ali vendor, as I got a display delivered today (this one, 4.0 inch with touch, explicitly named ILI9488) but instead got a ST7796 delivered :( and that is already working fine with ESPEasy, so nothing to test yet...
/Ton (PayPal.me)

pp1wvc
Normal user
Posts: 38
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: Support ILI9488 Display 3.5" Espeasy

#11 Post by pp1wvc » 29 Oct 2023, 20:51

Ath wrote: 19 Sep 2023, 20:00 I will have to re-order from a different Ali vendor, as I got a display delivered today (this one, 4.0 inch with touch, explicitly named ILI9488) but instead got a ST7796 delivered :( and that is already working fine with ESPEasy, so nothing to test yet...
I wasn't able to improve much. In a new compilation, these warnings appear.

src/src/PluginStructs/P095_data_struct.cpp: In function 'const __FlashStringHelper* ILI9xxx_type_toString(const ILI9xxx_type_e&)':
src/src/PluginStructs/P095_data_struct.cpp:10:10: warning: enumeration value 'ILI9486_320x480' not handled in switch [-Wswitch]
switch (device) {
^
src/src/PluginStructs/P095_data_struct.cpp:10:10: warning: enumeration value 'ILI9488_320x480' not handled in switch [-Wswitch]
src/src/PluginStructs/P095_data_struct.cpp: In function 'void ILI9xxx_type_toResolution(const ILI9xxx_type_e&, uint16_t&, uint16_t&)':
src/src/PluginStructs/P095_data_struct.cpp:39:10: warning: enumeration value 'ILI9486_320x480' not handled in switch [-Wswitch]
switch (device) {
^
src/src/PluginStructs/P095_data_struct.cpp:39:10: warning: enumeration value 'ILI9488_320x480' not handled in switch [-Wswitch]
src/src/PluginStructs/P095_data_struct.cpp: In function 'const __FlashStringHelper* P095_CommandTrigger_toString(const P095_CommandTrigger&)':
src/src/PluginStructs/P095_data_struct.cpp:67:10: warning: enumeration value 'ili9486' not handled in switch [-Wswitch]
switch (cmd) {
^
src/src/PluginStructs/P095_data_struct.cpp:67:10: warning: enumeration value 'ili9488' not handled in switch [-Wswitch] :(

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Support ILI9488 Display 3.5" Espeasy

#12 Post by TD-er » 29 Oct 2023, 21:15

Those look like warnings.
It should compile anyway.
But I wonder if this is the final code on GitHub, or did you make some changes?
We usually go for 0 warnings in compiling the code.

pp1wvc
Normal user
Posts: 38
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: Support ILI9488 Display 3.5" Espeasy

#13 Post by pp1wvc » 30 Oct 2023, 16:25

TD-er wrote: 29 Oct 2023, 21:15 Those look like warnings.
It should compile anyway.
But I wonder if this is the final code on GitHub, or did you make some changes?
We usually go for 0 warnings in compiling the code.

After deleting these lines the warning disappeared from the compilation.
# ifdef P095_ENABLE_ILI948X
# endif // ifdef P095_ENABLE_ILI948X
But the library didn't work.

pp1wvc
Normal user
Posts: 38
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: Support ILI9488 Display 3.5" Espeasy

#14 Post by pp1wvc » 16 Nov 2023, 13:09

If anyone can help, I verified that a change was made to plugin P095 which made ILI9486/ILI9488 optional
* Changelog:
* 2022-07-20 tonhuisman: Made support for ILI9486/ILI9488 optional and excluded by default as these are not available as
* regular SPI devices (3/4 wire SPI)

I see that in ESPEasy\src\src\PluginStructs it is possible to activate and deactivate this plugin
# define P095_ENABLE_ILI948X // Enable or disable support for ILI9486 and ILI9488.
// MUST reflect similar #define in Adafruit_ILI9341.h !
This option doesn't work!

I managed to make the ILI9486/ILI9488 option appear, just by deleting the lines
# ifdef P095_ENABLE_ILI948X
# endif // ifdef P095_ENABLE_ILI948X but this just wasn't enough for the P095 plugin to work with the ILI948X.

# ifdef P095_ENABLE_ILI948X
ILI9xxx_type_toString(ILI9xxx_type_e::ILI9486_320x480),
ILI9xxx_type_toString(ILI9xxx_type_e::ILI9488_320x480),
# endif // ifdef P095_ENABLE_ILI948X


# ifdef P095_ENABLE_ILI948X
static_cast<int>(ILI9xxx_type_e::ILI9486_320x480),
static_cast<int>(ILI9xxx_type_e::ILI9488_320x480),
# endif // ifdef P095_ENABLE_ILI948X


Question:
1- Where can I activate ILI9486/ILI9488 without deleting these lines? I believe that somewhere in the code I am leaving the option disabled.
2 - Is there any debug method to guide the activation of the drive for the ILI9486/ILI9488 panel?
:?:

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Support ILI9488 Display 3.5" Espeasy

#15 Post by Ath » 16 Nov 2023, 14:04

pp1wvc wrote: 16 Nov 2023, 13:09 Question:
1- Where can I activate ILI9486/ILI9488 without deleting these lines? I believe that somewhere in the code I am leaving the option disabled.
2 - Is there any debug method to guide the activation of the drive for the ILI9486/ILI9488 panel?
:?:
1) In the matching .h file there is a #define to enable/disable features like these (that's by C convention, to put 'flags' like that in the .h file)
2) No, the current initialization sequence I copied from TFT_eSPI repository (that has them for many of these displays), but so far it doesn't seem to work as expected. But I haven't yet put much time in it. I have received the ILI9486 & ILI9488 displays, that I hope/expect to be of the correct type, but there are no clear markings on it... :o
/Ton (PayPal.me)

pp1wvc
Normal user
Posts: 38
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: Support ILI9488 Display 3.5" Espeasy

#16 Post by pp1wvc » 25 Nov 2023, 20:04

I've been trying to create a plugin exactly with this repository https://github.com/Bodmer/TFT_eSPI
But I have little knowledge and I'm using the _P095_ILI9341 plugin as a base, which is very different, making my journey even more difficult. :(
Have you tried or know this repository https://github.com/lovyan03/LovyanGFX?
It has better performance than the first, as it is a revision created by Japanese people and opens up possibilities for integrating the lvgl library https://github.com/lvgl/lvgl. :arrow: https://www.youtube.com/watch?v=IPCvQ4o_WP8
Which I see as a high level evolution for monitors for the espeasy.

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Support ILI9488 Display 3.5" Espeasy

#17 Post by Ath » 25 Nov 2023, 21:06

I have been using SPI_eTFT as 'inspiration' for the ILI9486 and ILI9488 displays, but that wasn't working at all. I've been searching for alternative initialization sequences, as that's the key part to get this working, but haven't been successful yet. There is a slight improvement, using code from the Luma project, but still not showing text on the display. :(

Currently we don't have intentions to go for the graphics UI as found in the lovyan03 repo, and also no interest to go for lvgl based graphics, as that's completely not compatible with the current shape of displays in ESPEasy. I'm more inclined to go for the Adafruit GFX library, that I wrote a generic interface for, as used in most ESPEasy Color LCD plugins (and the monochrome P141 Nokia 5110 display). Switching to another graphics/display standard involves a complete rewrite of all display plugins, and that's not on any roadmap or plan yet.
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests