On the site aliexpress I bought 3.95 TFT touch screen band and an Arduino Mega 2560 . Please help me to find a really working library for it . For example before this I was looking for a library for 3.5 touch screen and it has working only when I found out that it NIC35WS model and this model is written in UTFT.h . Here in the forum I found a link supposedly to the library for this controller , but in considering them I understood that to work they will not and are often used in these libraries readID function returns different values - 0 , 404 , 5353 and other ... I would be very grateful for your help , my e-mail - firstname.lastname@example.org
Please post a link to your actual display. Does it fit a UNO? Or does it only fit a MEGA2560?
I specifically bought a kit , the work of this display must be only with Arduino mega 2560
We have no idea what you have actually got. The Aliexpress entry shows a board saying (ili9488) and a description saying R61581 with a display resolution of 400x270. And sometimes it says 3.95" and elsewhere 3.5"
Measure the screen in mm. i.e. width and height of the white area (black when off)
If we know the dimensions, we can probably guess what you have got.
Screen - height : 60.0 mm width : 94.0 mm Board on which is mounted the screen - height : 64.0 mm , width : 100.0 mm . And I should add that connectors on screen board wider that connectors on the Arduino board by about 2-3 mm , so I have to connect using wires
That is good news. 94/60 = 1.57 400/270 = 1.48 480/320 = 1.50 400/240 = 1.67
So it looks as if you have a 480x320 screen. Install UTFT library. Then try ILI9488, ILI9486, ILI9481, R61581, HX8357.
Say which one works "best". Or not at all.
When we know which controller you have, we might point you to a faster library. Meanwhile, UTFT is well supported with plenty of examples. UTouch library should work with your display.
The shield in your link should mate with the MEGA2560 headers. Straighten the headers and try again. Also compare your board with the photos in your link. Are there any differences?
You might like to try this library. It works with the 400x240 display (Ali express advert says 400x270 but that might be wrong).
TFT_400x240.zip (51.3 KB)
I have most of them tried it , the result is a flickering screen + black + shades of grey . I took the sketch UTFT\Arduino(ARM)+Teensy\UTFT_Demo_480_320 and UTFT\Arduino(AVR)\UTFT_Demo_480_320 , the initialization string , for example - UTFT myGLCD(ILI9481,38,39,40,41); and get the result which I have described . 9488 and some of the others I can’t try, because the sketch is going with the error , for example : ILI9488 was not declared in this scope . as I wrote earlier - if the controller or the display model missing in UTFT.h there will be this error , and in the folder there is only tft_drivers these controllers : cpld ,hx8340b, hx8347a, hx8352a, hx8353c, ili9320 , ili935c, ili9325d, ili9327, ili9327_8, ili9341, ili9381, ili9386, pcf8833, r61581, s1d1121, s6d0164, s6d1121, ssd1289, ssd1963, st7735, sst7735s . Tell me , in principle it is possible that you would , for example via team viewer you tried to look how to force to work my display ?
I unzipped the library into TFT_400x240 and copied it in librarys , and try to collect the sketch and get the error : TET_Clock_61581.ino 23:32 fatal error : Adafruit_R61581_AS.h : No such file or directory but this file is in the folder
I have no idea what you have been doing.
- install a fresh copy of the UTFT library. I believe it is v2.81
- you bought a MEGA2560. So plug the shield into the MEGA2560. Which is an AVR
take an example sketch e.g. C:\Users\David Prentice\Documents\Arduino\libraries\UTFT\examples\Arduino (AVR)\UTFT_Demo_480x320\UTFT_Demo_480x320.ino
edit the constructor:
// Remember to change the model parameter to suit your display module! //UTFT myGLCD(CTE32HR,38,39,40,41); //UTFT myGLCD(ILI9481,38,39,40,41); UTFT myGLCD(ILI9486,38,39,40,41); //UTFT myGLCD(R61581,38,39,40,41); //UTFT myGLCD(ILI9327,38,39,40,41);
Report back properly. i.e. with real tft_driver numbers. Say what you found with the 4 controllers that I suggested.
Please do NOT go unzipping random libraries into inappropriate folders.
I would expect your library to be somewhere like this: C:\Users\David Prentice\Documents\Arduino\libraries\UTFT
Obviously, it is unlikely that your User name is "David Prentice"
Launched 400х240 - works , but the some part of display is not used in all tested applications , so has a 3.5" screen, but in clock application - flickers, in the font application - all the letters of the deployed mirror
I know that you may have a language problem, but please try to answer questions accurately.
The UTFT_Demo_480x320 will obviously fit in a 480x320 screen. The UTFT_Demo_400x240 in a 400x240 screen.
400x240 will suggest other controllers. e.g. ILI9327 or R61509V
Works with the UTFT library 480x320 , the initialization string UTFT myGLCD(R61581,38,39,40,41); and provided that the commented out line : #define DISABLE_R61581 1 // CTE35IPS in memorysaver.h , but the image is reversed and displayed from right to left , such as DATE - ETAD , how to fix it ? Or do you think that it is necessary to more accurately determine the type of controller or display ?
Yes , and the answer to your question - from controllers ILI9488, ILI9486, ILI9481, R61581, HX8357 , as I wrote only works R61581 but when you work reverses the image , the text
Say which version of UTFT library. (look in the UTFT.h file) Say which example sketch you are running. Do not disable controllers in "MemorySaver.h". Your Mega2560 has got plenty of Flash.
Make notes of the result from trying the constructors in message #9 e.g. colours, quality, direction of text, mirroring, size of display e.g. 480x320
Then report back with all this information. It will take 20 minutes of your life.
You will probably get a solution very quickly. If you do not answer questions, readers will not bother to help you.
version UTFT library - #define UTFT_VERSION 278
runnig sketch - AVR\UTFT_DEMO_480x320.ino
the sketch will work if the file memorysaver.h add a comment to the line //#define DISABLE_R61581 1 // CTE35IPS if the string is left as it is , without comment / / the sketch will not work
from controllers ILI9488, ILI9486, ILI9481, R61581, HX8357 , as I wrote only works R61581 but when you work reverses image , text
in my sketch, the screen displays 9 rows and at the bottom of the screen 3 buttons , now they are displayed on the screen : the top left displays a button labeled DATE / TIME and to her right two more buttons , and below them 9 lines of information . The entire text, such as text DATE - inverted
can I send you a picture of the display ?
Delete your current UTFT v2.78 or move elsewhere. Download and install the current UTFT v2.81
Run the Demo_480x320 sketch with the previous constructors.
Report back properly. e.g. a paragraph for each constructor.
version of UTFT library - #define UTFT_VERSION 278
sketch running - AVR\UTFT_DEMO_480x320.ino
if I don’t add a comment to a line #define DISABLE_R61581 1 // CTE35IPS in memorysaver.h , the sketch will not work
I try controllers ILI9488, ILI9486, ILI9481, R61581, HX8357 , as I wrote only works R61581, but when its work reverses the image and the text
can I send you a picture of results of work of the sketch on the display ?
I give up. I will not waste any more of my time if you are not prepared to help yourself.