This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pro2 PLUS] warning about some 2.8 SPI TFT (ILI9341) displays on eBay.
#21
(15-04-2018, 01:25)Werk_AG Wrote: I would like to see the position of the touch panel connector.

Out of curiosity, the seller have pictures of the display with the XPT2016 chip and with HR2046 chip too. I suspect that the problem is not the chip, but two other factors: the type of the touch panel and the way it is connected in relation to the original display.
There are libraries which include examples code to do calibration of the touch panel no matter the rotation you want to use, none of them that I know will deal with those displays.

Of course that with some work (tedious) its possible to change the code (a nightmare for future software upgrades) to make them work. The better is buy the right type of display, they are available from many sellers.

Hello Werk,

here are pictures of my display.
[Image: y4mRCgsQcW0BVY7wrOTm86quVGR4qk-xBmKF1cPh...pmode=none]

[Image: y4mfdNTYZYbGlJmIr95T3QOjOqxn6CwQdQZmzirj...pmode=none]

[Image: y4mIAh-CKj62PoM0_X0xVmXMb6a6Ha9kvSlbyNEW...pmode=none]

I bought some displays from two different sellers and I always got this one which looks nearly the same. Maybe somewhere production was changed...

Your seller unfortunately does not ship to Germany. 

Regards
Reply
#22
Hi Werk,

problem solved  Smile .
It seems there is a new version of Paul Stoffregen's touch library.
https://github.com/PaulStoffregen/XPT2046_Touchscreen

This supports the setting of the rotation:
Code:
ts.setRotation(1);

Now it's working fine with setting the rotation to 3, because my touch foil was mirrored in x and y, so I flipped it to times to the right.

So if you would include the new version in your next update and make this parameter adjustable in the configs, everything is fine.
Reply
#23
Hi engolling,

Thank you for the pictures of your display, and by the news about the updated Paul Stoffregen touch library (all work from Paul Stoffregen is fantastic).
I already give a look at the new library, and I liked the changes. If I manage to make it work with the standard display's, and also with the new ones, surely I will include it on the next software update.

The displays like your (with the yellow pins) doesn't seem the most problematic to add support, as the touch panel is the same and is installed in the same position than the  TFT displays that we are using since ever.

If possible I would like to ask you a favour: using the TouchTest sketch included in the new library, could you please post here the coordinates of the four corners of your screen, using the four possible setting for ts.setRotation(x). This will be very helpful.

Please use this setting:

Code:
XPT2046_Touchscreen ts(CS_PIN, 255);  // Param 2 - 255 - No interrupts

CS_PIN on Pro2 PLUS boards v2.x is pin 38

Once again, thank you.
MeteoCercal - Air Quality Data
Click here to watch at my ThingSpeak channel



Reply
#24
Hi Werk,

I'm glad that I can contribute to this pretty cool project.

While testing I got a certain range of the coordinates. I've never worked with a touch screen, but I think this is normal without any filtering.
Here are the coordinates:

setRotation(1)
Upper left:   x= 350   y= 250
Upper right: x= 3850 y= 425
Lower right: x= 3930 y= 2550
Lower left:   x= 303   y= 4030

setRotation(2)
Upper left:   x= 200   y= 3760
Upper right: x= 250   y= 250
Lower right: x= 4000 y= 150
Lower left:   x= 4000 y= 3800


setRotation(3)
Upper left:   x= 3880 y= 3808
Upper right: x= 260   y= 3730
Lower right: x= 130   y= 64
Lower left:   x= 3800 y= 64

Best regards,
engolling
Reply
#25
Hi engolling,

Thank you.
Perhaps I could deduct it from the three other results, but if possible please post also results for setRotation(0)

Some fluctuation on the readings for a single point its normal, don't worry about it.
I'm just trying to determine the coordinates origin and limits, for each setRotation setting.

Regards
MeteoCercal - Air Quality Data
Click here to watch at my ThingSpeak channel



Reply
#26
Sorry forgot have of the posting Smile

setRotation(0)
Upper left:   x= 3880 y= 370
Upper right: x= 3664 y= 3709
Lower right: x= 200   y= 3800
Lower left:   x= 100   y= 330

Edit: I just saw, that you rotate the display view after initialization.
Code:
 tft.init();
 tft.setRotation(3);
 Could it be, that TFT and touch have in this hardware version finally the same orientation.
Reply
#27
(16-04-2018, 20:44)engolling Wrote: Edit: I just saw, that you rotate the display view after initialization.
Code:
 tft.init();
 tft.setRotation(3);

What do you mean with having setting the rotation after tft.init? I think that if done before screen don't start.

(16-04-2018, 20:44)engolling Wrote: Could it be, that TFT and touch have in this hardware version finally the same orientation.

I'm afraid that its exactly the contrary: Using setRotation(3) with those Yellow Pin Displays, the origin of the touch coordinates are on the Lower Right, not seems very logical... by comparison the displays we are used to use, with setRotation(3), have the origin of the touch coordinates at the Upper Left, which seems more logical.

Perhaps it will be possible to add an user configurable parameter to support different versions of the TFT display. Yesterday, I ordered one of those "yellow pin displays" to make some tests. I suspect that the X,Y lines are connected inverted to the HR2046.
MeteoCercal - Air Quality Data
Click here to watch at my ThingSpeak channel



Reply
#28
(16-04-2018, 21:41)Werk_AG Wrote:
(16-04-2018, 20:44)engolling Wrote: Edit: I just saw, that you rotate the display view after initialization.
Code:
 tft.init();
 tft.setRotation(3);

What do you mean with having setting the rotation after tft.init? I think that if done before screen don't start.

(16-04-2018, 20:44)engolling Wrote: Could it be, that TFT and touch have in this hardware version finally the same orientation.

I'm afraid that its exactly the contrary: Using setRotation(3) with those Yellow Pin Displays, the origin of the touch coordinates are on the Lower Right, not seems very logical... by comparison the displays we are used to use, with setRotation(3), have the origin of the touch coordinates at the Upper Left, which seems more logical.

Perhaps it will be possible to add an user configurable parameter to support different versions of the TFT display. Yesterday, I ordered one of those "yellow pin displays" to make some tests. I suspect that the X,Y lines are connected inverted to the HR2046.

Hello Werk,
I did not mean the "after" chronologically. I just wanted to express, that you give a 3 as rotation parameter.
I just thought in German and translated it to English Sleepy .


So at the moment the initialization of tft and touch look like this and everything is fine:

Code:
 tft.init();
 tft.setRotation(3);
 tft.setTextWrap(false);
 #if (PCB_VERSION < 20)
   touch.begin();
 #else
   ts.begin();
   ts.setRotation(3);
 #endif
#endif

If you take the writing on the back side of the pcb as reference text is starting from upper left to the right.

But if I initialize with the following code, everything is also right as expected but just two times rotated counterclockwise about 90°

Code:
 tft.init();
 tft.setRotation(1);
 tft.setTextWrap(false);
 #if (PCB_VERSION < 20)
   touch.begin();
 #else
   ts.begin();
   ts.setRotation(1);
 #endif
#endif

That means for me that the coordinates of the touch foil and tft are arranged more reasonable in the "yellow pin" display version.

In conclusion this means, that there is no need to change the touch library, because you can just change the rotation of the tft, pass the argument (1) and everything is fine.
Reply
#29
Hi engolling,

Would you like to try a test software version which perhaps already work with those "Yellow Pin Displays"?
I kept the screen rotation at 3 (to don't break backward compatibility) but added a user configurable parameter for the touch rotation.
The test version is already using the updated library from Paul Stoffregen.
MeteoCercal - Air Quality Data
Click here to watch at my ThingSpeak channel



Reply
#30
(16-04-2018, 22:45)Werk_AG Wrote: Hi engolling,

Would you like to try a test software version which perhaps already work with those "Yellow Pin Displays"?
I kept the screen rotation at 3 (to don't break backward compatibility) but added a user configurable parameter for the touch rotation.
The test version is already using the updated library from Paul Stoffregen.

Hello Werk,

I would be a favour for me to test the new software version this evening.

Regards
Reply




Users browsing this thread: 1 Guest(s)