TFT 320QDT 9341 library?

And finally this is the UTFT.h

As you can see (and also who says "I do not believe you", without testing the real configuration... :confused: ) the version is 282 and I downloaded it from the Rinky-Dink Electronics web site.

I can send you the full library if you want.

Ciao.

/*
Β  UTFT.h - Multi-Platform library support for Color TFT LCD Boards
Β  Copyright (C)2015 Rinky-Dink Electronics, Henning Karlsen. All right reserved
Β  
Β  This library is the continuation of my ITDB02_Graph, ITDB02_Graph16
Β  and RGB_GLCD libraries for Arduino and chipKit. As the number of 
Β  supported display modules and controllers started to increase I felt 
Β  it was time to make a single, universal library as it will be much 
Β  easier to maintain in the future.

Β  Basic functionality of this library was origianlly based on the 
Β  demo-code provided by ITead studio (for the ITDB02 modules) and 
Β  NKC Electronics (for the RGB GLCD module/shield).

Β  This library supports a number of 8bit, 16bit and serial graphic 
Β  displays, and will work with both Arduino, chipKit boards and select 
Β  TI LaunchPads. For a full list of tested display modules and controllers,
Β  see the document UTFT_Supported_display_modules_&_controllers.pdf.

Β  When using 8bit and 16bit display modules there are some 
Β  requirements you must adhere to. These requirements can be found 
Β  in the document UTFT_Requirements.pdf.
Β  There are no special requirements when using serial displays.

Β  You can find the latest version of the library at 
Β  http://www.RinkyDinkElectronics.com/

Β  This library is free software; you can redistribute it and/or
Β  modify it under the terms of the CC BY-NC-SA 3.0 license.
Β  Please see the included documents for further information.

Β  Commercial use of this library requires you to buy a license that
Β  will allow commercial use. This includes using the library,
Β  modified or not, as a tool to sell products.

Β  The license applies to all part of the library including the 
Β  examples and tools supplied with the library.
*/

#ifndef UTFT_h
#define UTFT_h

#define UTFT_VERSION	282

#define LEFT 0
#define RIGHT 9999
#define CENTER 9998

#define PORTRAIT 0
#define LANDSCAPE 1

Real life results are better than my guesswork.

Yes, of course I believe you that CTE32_R2 works. But since it has been #defined with the same value as ILI9341_16 I would expect ILI9341_16 to work too.

Both macros have the value 17 as in #10.

David.

Hi, Aldo! Hi, David!

I'm happy to chat with you!
I reduced the example program to a minimum
and did it with both lines

UTFT myGLCD(CTE32_R2,38,39,40,41);
or
UTFT myGLCD(ILI9341_16,38,39,40,41);

I know that Both macros have the value 17

///////////////////////////////////////////////////

#include <UTFT.h>

// Arduino Mega:
// -------------------
// Standard Arduino Mega/Due shield : ,38,39,40,41
// CTE TFT LCD/SD Shield for Arduino Mega : ,38,39,40,41

//UTFT myGLCD(CTE32_R2,38,39,40,41);

UTFT myGLCD(ILI9341_16,38,39,40,41);

void setup()
{

// Setup the LCD
myGLCD.InitLCD();

}

void loop()
{
myGLCD.fillScr(255, 0, 0);
delay (3000);
myGLCD.fillScr(0, 255, 0);
delay (3000);
myGLCD.fillScr(0, 0, 255);
delay (3000);
}

//////////////////////////////////////////

I use UTFU the version 282 and I too downloaded it from the Rinky-Dink Electronics web site.

Aldo, please see how my example works for you. The screen should change color every three seconds (I love basketball). If it works correctly, send me a full library.

Thank you all!
Sergei

Hi Sergei,

yes it works fine. Blue red green colors are displayed.

Please send me your email address and I'll send you the library. I am also on dropbox if you prefer that way of sharing.

Ciao.

Aldo

aldozan:
Hi Sergei,

yes it works fine. Blue red green colors are displayed.

Please send me your email address and I'll send you the library. I am also on dropbox if you prefer that way of sharing.

Ciao.

Aldo

Hi, Aldo! Hi, David!

My TFT_320QDT_9341 not work with Aldo's UTFT-Library...

I'm sorry

Serge

Serge,
can you please post pictures of the screen and the shield? Just to be sure we are talking about the same object. Or you can check that by yourself looking at the picture in reply #7 in this thread.

Ciao.

Aldo

I would like to add one point on the screen/shield: it uses most of the available pins on a Mega, and you cannot use the left ones unless you prepare special male pins curved at 90Β°. For such a reason I have not yet used the screen / shield in any project. (I am mainly interest in IoT and therefore I use a lot of ethernet shields and more recently Yun Shield or Esp8266)

Hi, David! Hi, Aldo!

I'm happy to report that the problem is solved!
However, the decision was so non-standard that you will be surprised.

Wandering the Internet in search of a suitable hint, I came across this site

It is in Russian, so it will not be clear to you, but I will explain.
"...послС Π·Π°Π»ΠΈΠ²ΠΊΠΈ скСтча Π±Π΅Π»Ρ‹ΠΉ экран...раскоммСнтировал ΡƒΠΆΠ΅ всС вСрсии шилдов ΠΏΠΎ ΠΎΡ‡Π΅Ρ€Π΅Π΄ΠΈ Π½Π΅ ΠΏΠΎΠΌΠΎΠ³Π»ΠΎ..."
"...After filling the sketch - a white screen ... uncommented already all versions of the hard drives one by one... - not help"
It was like my problem. I also noticed that the devices are the same as mine.
Especially it concerns a platform with a screen and a board between the platform with a screen and Arduino Mega. I have Arduino Mega 2560 R3.

The platform with the screen and the board are clearly visible in the photos.
I noticed the wires soldered to the board.
The interlocutor reported that "... Π½ΠΎΠ³ΠΈ ΠΎΡ‚ΠΎΠ³Π½ΡƒΡ‚Ρ‹ Π² стороны Π½Π° пСрСпаяном шилдС...". The interlocutor reported that "the legs are bent in the sides on the soldered board". I realized that the board came to him in this form from China.
I decided to repeat it at myself and asked the master to solder the wires, just like in the photo.

After connecting the modified board, the screen began to display everything as it should.

Hooray!

Yours sincerely,
Serge

aldozan:
I am too mainly interest in IoT and therefore. I use a lot of ethernet shields and more recently Yun Shield or Esp8266.

I interest in IoT too. I use a lot of shields - raspberry, Arduino Uno and Mega, Esp8266 annnnd other shields.
I want to assemble ROV. My wife and I plan to go to Baikal in next year.
I want to shoot on the video the bottom of Baikal in the deepest place.
This is necessary for me to develop a ROV capable of sinking to great depths.
Have you tried to establish a connection between the ESP8266 underwater?

Best regards!
Serge

I am gobsmacked. The TFT control lines are on D38-D41. It is possible to find a schematic for ElecFreaks V2.0 but I have never found anything for V2.2.

I would assume that the pinout would be the same.
So the "wiring" simply moves the XPT2046 signals to D42, D43, D47, D48, D49 which were NC (no connection).

So this would make no difference to the TFT.
Bending the D2-D6 pins so that they do not mate with the D2-D6 on the header socket. But the Arduino does not use those pins unless you tell it to. e.g. with a Touch program.

Anyway, the good news is that your TFT is working now. The Touch should work too. But obviously you should change the constructor for the re-wired pins.

Perhaps your Russian website has an explanation. The real mystery is why V2.2 does not have a schematic.

David.

Great to hear that you fixed the issue.
It's really a strange thing. In my shield pins 0 -7 (those soldered in the picture in the Russian site) are connected on the PCB to the integrated circuit on the top of the row of five; pins 48 and 49 are not used and pins 42 - 43 are connected to the bottom integrated. I could think of something not working into the IC. As far as I can see from the pictures my shield is identical to the one in the article.

Serge,
regarding the ROV: it's fun I am (also) a diving instructor with many hundreds of dives and some years ago I was involved in a scientific expedition in the Red Sea, where we used a ROV to explore a wreck at -148 mt. I just assisted in the initial phase of the ROV immersion and in its tests - I mean I am not a ROV operator and even less an expert - but I remember the the people talked all the time of wire-connected vehicles. I believe (but I can be wrong) that you cannot keep alive wifi connection for more than 10 meters underwater, while I am sure you need to have a much longer range to cover. (Wiki says Baikal is 1642 meters deep).
How do you plan to overcome that issue?

Ciao. Aldo

Hi, Aldo! Hi, David!

I began to rejoice early. The problem is not completely solved. The screen shows normal, but does not always respond to pressing. The worst thing is that the screen starts responding to pressing after a normal reboot. And also after the reboot, it ceases to perceive touch.

David, what combination of devices would you recommend?
Arduino Mega 2560 with what board and what screen?
I need a screen size of 3.2 - 3.5 ".

Best regards,
Serge

The Red Mcufriend Mega2560 shields are ok for TFT, Touch. The microSD does not work.
The Blue ILI9481/HX8357 Mega2560 shields are ok for TFT, SD. They don't have Touch.

The Red/Blue Mcufriend Uno shields are ok for TFT, Touch, microSD but are slow on a Mega.

Personally, I see little point in 40-pin 3.3V displays like your one. But it should work ok with the Adapter. i.e. TFT, Touch, SD.
I am very sceptical about your problem and your solution.

David.

aldozan:
I believe (but I can be wrong) that you cannot keep alive wifi connection for more than 10 meters underwater, while I am sure you need to have a much longer range to cover. (Wiki says Baikal is 1642 meters deep).
How do you plan to overcome that issue?

Hi, Aldo!
Yes, the depth of Lake Baikal is more than 1600 meters. I plan to communicate with the robot on a fiber-optic line. The cable will be three-core: one - optical and two - copper stranded to power the robot with electricity. Perhaps I will let down the robot on a steel or synthetic string.

Perhaps I will lower the robot in the "garage".

It's very good that you are fond of diving. Then you must know how Robert Ballard found the Titanic. He let down two ROW in the garage. When the survey of the Titanic, he spent, releasing the ROW from the garage. Necessarily both together! He had a case-the cable of one ROV stuck in the armature and help to be pulled out by another ROV.

I am interested in the possibility of organizing a connection between the ROV and the garage with the help of the ESP8266. Many people have told me that long-distance communication under water on VHF is not possible. But no one told me that he had tested and got some results. But an acquaintance submariner told me that when his submarine lay on the ground a kilometer from the shore at a depth of about 30 meters, the submariners listened to the radio of the VHF stations. I plan to conduct such tests next spring at the Voronezh reservoir. I live near to him.

Where do you live?

If you want, you can participate in this. Even to go to Baikal. But no one pays us, we do everything for our money.

Best regards!
Serge

david_prentice:
I am very sceptical about your problem and your solution.

The final decision has not yet been taken. We are conducting a series of experiments to obtain the optimal result. The supplier swore that his products would work perfectly. We bought three sets from him. No kit works as it should. The supplier stopped responding.

I sent the Russian present to you.
Postal number RB859785257RU

And further.
The chief allowed to send one set to you, so that you would investigate it.
I will send devices the next Saturday or Sunday.
Ok?

Best regsrds!
Serge

david_prentice:
The Red Mcufriend Mega2560 shields are ok for TFT, Touch. The microSD does not work.
The Blue ILI9481/HX8357 Mega2560 shields are ok for TFT, SD. They don't have Touch.

The Red/Blue Mcufriend Uno shields are ok for TFT, Touch, microSD but are slow on a Mega.

Personally, I see little point in 40-pin 3.3V displays like your one. But it should work ok with the Adapter. i.e. TFT, Touch, SD.
I am very sceptical about your problem and your solution.

David.

We need a working option - a 3.2-3.5-inch color screen.
At first we did not know the size and I made a 2.2 inch screen. But the head looked and he did not like it. He said "small." Then we bought a 3.2 inch. But he was not touched. And we ran into another Chinese trait.

But we decided on the following:

  • a color screen measuring 3.2-3.5 inches with touch,
  • SD card for storing button images,
  • Arduino Mega for managing the set.

Having read this thread, you might be interested in another library that might offer you some improvements, especially if you use a DUE where you can use DMA. The library will work for AVR boards too.

Library is ILI9341_due
There, you will find a link to Marek's github and there is a good thread in this section of the forum too.

I use displays from buydisplay.com together with the DUE at fairly high SPI speeds.
All interfaces work, onboard SD card and touch using XPT2046 resistive touch.

The DUE is 3.3V as is this display, so it all matches up quite well.

Anyhow, just my three cents worth.


Paul - VK7KPA

Serge,
have a look at Itead too. https://www.itead.cc/display/tft-lcm.html
They have low cost good quality TFT screens compatible with Arduino and UTFT. I used a couple of them and my experience was positive.

Cheers
Aldo

Serge,
about the touch: my TFT/shield works fine with the URTouch library. You can download it from Rinky-Dink Electronics as usual.

Ciao. Aldo

My dear friends!

I thank everyone for their help and tips!
The problem is solved. However, for this I wrote a small program for handling touches.
I am grateful for your support.

Best regards,
Serge