Go Down

Topic: Graphics library for NodeMCU (ESP8266), ESP32 and serial+parallel TFT displays (Read 69050 times) previous topic - next topic

Mac_che

According to the text it says touch, according to the screenshots it has a resistive display but I am missing the xpt2046 or touch IC in general, let alone the touch cs pin to drive it. Can you confirm yours has touch?
I like those screens (whith proper AMS1117 that is) buttmost of them are lacking touch.

david_prentice

Go on.   There is a Mcufriend display with link from krutoy1961 in #251

Then we have a post from Mac_che about an unrelated display.
Please post a link or quote a message #.

David.

Mac_che

Quote
https://www.ebay.com/itm/3-5-inch-TFT-LCD-Touch-Screen-Display-Module-480X320-fr-Arduino-Mega-2560-UBS/372495625182?epid=8009037594&hash=item56ba782bde:g:CfYAAOSwg8taA-~N:rk:1:pf:0
That's the screen we are talking about. Post #251.

Read the description: 3-5-inch-TFT-LCD-Touch-Screen-Display. Cannot make it clearer.


According to the text it says touch, according to the screenshots it has a resistive display but I am missing the xpt2046 or touch IC in general, let alone the touch cs pin to drive it. Can you confirm yours has touch?
I like those screens (whith proper AMS1117 that is) but most of them are lacking touch.

This is just to prevent a "touch screen is not working" question in a while.

david_prentice

The Mcufriend Uno shields have a Touch panel.   Just look at the photos.

No,  there is no Touch Controller i.c.   It is just the bare resistive panel with the four XP, XM, YP, YM connections.

The TouchScreen library has to read the Resistive panel with the Arduino ADC.
It performs exactly the same tasks in software as the XPT2046 i.c. does in hardware.   i.e. apply voltages and read ADC.

The biggest problem is that Mcufriend make no attempt to restrict the backlight current and abuse the Arduino 3.3V regulator mercilessly.
The earlier Mcufriend pcbs were not perfect.    (100% fine with 3.3V GPIO but "worked" with 5V GPIO)
 
David.

krutoy1961

Touch your wrist to the bottom of the screen.
Warm is ok.   Hot is BAD.

David.
esp32 the simplest for $4 with aliexpress,
the display is not heated, heated the stabilizer on esp32,
probably illumination loads, but this temporary solution only for testing

krutoy1961

MCUFRIEND_kbv library should detect the controller and perform everything correctly in software (until the hardware overheats and fails).

David.
David,
tried to start esp32 on MCUFRIEND_kbv,
the white screen (on UNO everything is normal),
everything rewrote pins as were on Tft_espi,
tried so:
#define LCD_RST 32
#define LCD_CS 33
#define LCD_RS 21

#define LCD_WR 22
#define LCD_RD 23

#define LCD_D0 13
#define LCD_D1 12
#define LCD_D2 14
#define LCD_D3 27
#define LCD_D4 26
#define LCD_D5 25
#define LCD_D6 2
#define LCD_D7 4

UTFTGLUE myGLCD(LCD_CS, LCD_RS, LCD_WR, LCD_RD, LCD_RST);
UTFTGLUE myGLCD(0x8357,LCD_CS, LCD_RS, LCD_WR, LCD_RD, LCD_RST);
UTFTGLUE myGLCD(0x9481,LCD_CS, LCD_RS, LCD_WR, LCD_RD, LCD_RST);

LCD_ID_readnew file
do not prompt where a mistake?

david_prentice

I strongly suggest that you use the TTGO wiring i.e.
from mcufriend_kbv/utility/mcufriend_shield.h
Code: [Select]

#elif defined(ESP32)       //regular UNO shield on TTGO D1 R32 (ESP32)
#define LCD_RD  2  //LED
#define LCD_WR  4
#define LCD_RS 15  //hard-wired to A2 (GPIO35)
#define LCD_CS 33  //hard-wired to A3 (GPIO34)
#define LCD_RST 32 //hard-wired to A4 (GPIO36)

#define LCD_D0 12
#define LCD_D1 13
#define LCD_D2 26
#define LCD_D3 25
#define LCD_D4 17
#define LCD_D5 16
#define LCD_D6 27
#define LCD_D7 14

Note that Bodmer and I use the same ESP32 wiring.    

Which controller do you have?
The RM68140 controller has slightly different timing to the Ilitek controllers.   The Beta should be fine.   The regular v2.9.8 Release might not be happy with RM68140

Note that your readreg report is returning rubbish.   So the defines that you quoted in your message obviously do not match your wiring.

David.

bodmer

It is possible to use the resistive only (i.e.no touch controller chip like XPT2046) screen with the mcufriend shields and ESP32 UNO style boards.

There is a modified touch library here, but I have not tried it myself.

krutoy1961

I strongly
Which controller do you have?
David,
inserted the display into UNO, works normally,
LCD_ID_readreg, copied in the file

david_prentice

Yes,  you have a Raydium RM68140
Code: [Select]

reg(0x00BF) FF FF 68 14 00 FF ILI9481, HX8357-B


As I said earlier,  there are timing problems with fast Arduinos e.g. Cortex-M3, Cortex-M4, ESP32, ...

Delete your current library installation directory and install the Beta from GitHub ZIP.

This particular shield takes a massive backlight current.   The panel will feel very warm.

David.

krutoy1961

Delete your current library installation directory and install the Beta from GitHub ZIP.
David, perhaps I do something not so,
established Beta,
but at me is not present in arduino ide TTGO I choose Esp32 dev,
(too tried others, ESP32 is costed by the last), opened LCD_ID_readreg.ino
but the compiler does not use mcufriend_shield.h (I renamed the file).

david_prentice

It is always wise to start with the recommended wiring and library examples.

If you can not get the examples working there is little point in you inventing your own versions.

You will find that Authors will be keen to help with any problem that is due to their library code or example.

David.

Dancopy

I came across this site recently and have been impressed at what a ESP8266 based NodeMCU can be persuaded to do.

The sketch set uses a WiFi Locator to work out your location and download a jpeg map off the internet (e.g. Google maps).  It then checks what planes are in the area and plots their location on the map, with info displayed on the nearest plane.  How cool is that!

I have forked the project here and adapted it to be compatible with the latest TFT_ILI9341_ESP library and the latest JPEGDecoder library.

So, if you have the TFT_ILI9341_ESP library running with a display it should be straightforward to download the entire project sketch folder and get it up and running.



Hi Bodmer!
Have your sketches here that were made with the TFT_ILI9341_ESP library also work with the ILI9488 library for 3.5 Inch (320x480) screens? I say this because, for example, your "esp8266-plane-spotter-color" project would of course be better viewed on a larger screen (such as https://www.ebay.com/itm/3-5-inch-TFT-LCD-Touch-Screen-Display-Module-480X320-fr-Arduino-Mega-2560-UBS/372495625182), just as your "esp8266 Weather Station Color" project and your other projects could also benefit with screens larger than 320x240.
Hugs from Brazil

Dancopy

Try the attached version. It is not perfect (some text position issues) but it should work OK. It is for a 480x320 screen.

Bodmer
It can be with this screen and esp8266 (Nodemcu): https://www.ebay.com/itm/3-5-inch-TFT-LCD-Touch-Screen-Display-Module-480X320-fr-Arduino-Mega-2560-UBS/372495625182

bodmer

@Dancopy
The link you provide is for an 8 bit parallel display, the TFT_eSPI library only supports displays of this type when using an ESP32.

The eBay advert indicates that one of many controllers could be fitted and thus you may end up getting a screen that is incompatible with the current version of the library.

I do not have any plans at the moment to migrate the Plane Spotter or weather sketches to a 320x480 display. In principle you could do this yourself. The plane and weather sketches that exist will run with a 320x480 display, they just won't fill it and the icons etc may end up looking smaller due to a smaller pixel size.

Go Up