Test the OpenSmart TFT IL9320 Display 2.8 inch - touch function
Goal of the test
The test application shows the touch point coordinates and pressure.
Conditions for the test
VERY IMPORTANT: After every getPoint call, you have to set the 4 pins back to inputs again, otherwise the writing to the TFT display fails!!!!!
For better pressure precision, we need to know the resistance between X+ and X-. Use any multimeter to read it. For the one we're using, its 397 ohms.
Programming the Arduino with pio run -t upload only works when the display is unplugged from the Uno.
Result of the test
With tft.setRotation(0), which is portrait mode with the icons at the bottom, the touch screen coordinate numbers range as follows:
Side | Coordinate |
---|---|
Left | 914 |
Right | 122 |
Top | 932 |
Bottom | 91 |
Programming
This project uses Platformio, see platformio.ini
Use the following commands:
$ pio run $ pio run -t upload $ pio run -t monitor
See zipped folder : TestDisplaySrc
Code at: TestDisplaySrc.ino
Comments: