Touch Panel not working using XPT2046_Touchscreen.h library

Status
Not open for further replies.

Jimbee

New member
Hi,

I am using a BuyDisplay 2.4" and 2.8" both using ILI9341 and xpt2046 for TP. I have tested both displays, connected to an Adafruit Metro M4 board using hardware SPI. Using the Adafruit_ILI9341.h & your XPT_Touchscreen.h library and using your TouchTest.ino example code. The displays alone work fine. Both TP's however do not work - the Arduino IDE serial monitor displays continuously (Pressure (z) = 4095, x = 0, y = 0). It seems to think the touch panel is always being touched but it is not. I have tried a second board Adafruit Grand Central M4 and it to exhibits the same issue with both display TP's. Your help would be greatly appreciated.

Wiring:
[Display Signals] [Metro M4 Signals]
D/C(SCL) ---- SCK
LCD_SDI ---- MOSI
LCD_SDO ---- MISO
TP_CS ---- D8


Thanks,
Jim
 
You need to use both sets of SPI pins on the display in parallel. Check out the BuyDisplay.com data sheets for the display for their pin assignments.

Also there are pins to use as a CS for the resistive touch screen. Look at the Adafruit touch_color example for additional pins used.
 
As @grease_ligthing mentioned, many of their displays have different pins setup to do SPI, one for the display and one that does the other things, like touch, like SD, or ...

Suggest in cases like that, that you give a link to which display you are using and configuration. Example I have a couple of different Buy display RA8875 displays, which some have resistive touch, others have capacitive touch. Some hook up through main connector others don't...

Also maybe show photo of your wiring with explanation (as some of us may not know Metro M4's wiring...) and maybe a short sketch that shows what is failing.
 
Status
Not open for further replies.
Back
Top