Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

warning about some 2.8 SPI TFT (ILI9341) displays on eBay.
#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


Messages In This Thread
warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 14-03-2018, 20:56
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by gekk-cz - 25-03-2018, 19:14
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by Barrow4491 - 26-03-2018, 01:27
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 26-03-2018, 02:16
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 26-03-2018, 02:28
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by gekk-cz - 29-03-2018, 12:53
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by f4aii - 09-04-2018, 17:28
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 10-04-2018, 07:15
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by engolling - 10-04-2018, 20:42
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by f4aii - 11-04-2018, 06:49
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 12-04-2018, 18:43
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by engolling - 14-04-2018, 23:18
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 15-04-2018, 01:25
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by engolling - 15-04-2018, 08:24
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by hornychz - 09-04-2018, 17:40
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 10-04-2018, 07:04
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by Barrow4491 - 12-04-2018, 23:34
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by f4aii - 13-04-2018, 21:27
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by Bill7300 - 15-04-2018, 00:14
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 15-04-2018, 01:48
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 13-04-2018, 22:04
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by engolling - 15-04-2018, 09:05
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 16-04-2018, 02:01
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by engolling - 16-04-2018, 20:21
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 16-04-2018, 20:36
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by engolling - 16-04-2018, 20:44
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 16-04-2018, 21:41
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by engolling - 16-04-2018, 22:12
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 16-04-2018, 22:45
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by engolling - 17-04-2018, 13:19
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 18-04-2018, 06:36
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 18-04-2018, 06:36
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by 41south - 22-01-2019, 04:05
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 22-01-2019, 04:40
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by 41south - 22-01-2019, 05:10
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 22-01-2019, 06:04
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by 41south - 22-01-2019, 06:08
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by 41south - 29-01-2019, 23:29
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by werk_ag - 30-01-2019, 03:25
RE: warning about some 2.8 SPI TFT (ILI9341) displays on eBay. - by 41south - 30-01-2019, 09:02



Users browsing this thread: 1 Guest(s)