xpt2046 read wrong coordinates

For general Flowcode discussion that does not belong in the other sections.
Post Reply
simisv
Posts: 25
http://meble-kuchenne.info.pl
Joined: Wed Oct 19, 2022 7:54 am
Has thanked: 5 times
Been thanked: 2 times

Flowcode v10 xpt2046 read wrong coordinates

Post by simisv »

Hi

I'm trying for first time resistive touch xpt2046 on a ESP32 CYD module using Flowcode 10 . This module was tested using Arduino IDE and is 100% ok .
Display used is 320x240 ili9341 .
Using Flowcode : X axis value is always 0 , y axis value is 39 when there is not touched and 2 to 36 when touched from top(2) to bottom(36) .
I don't know how to move forward in to solving these issue .
Any help much appreciated .
Thank you
Attachments
esp32_si_display_temp_dht22_forum.zip
(12.13 KiB) Downloaded 38 times

BenR
Matrix Staff
Posts: 2109
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 561 times
Been thanked: 744 times

Re: xpt2046 read wrong coordinates

Post by BenR »

Hello,

Have you tried changing the properties of the XPT2-46 component, e.g. the analogue mode from Differential to Single Ended?

You could also try changing the Channel to Software and see if that makes a difference.

simisv
Posts: 25
Joined: Wed Oct 19, 2022 7:54 am
Has thanked: 5 times
Been thanked: 2 times

Flowcode v10 Re: xpt2046 read wrong coordinates

Post by simisv »

Hi

Thank you Ben . You are right . Software SPI solved the problem and changing Analogue Mode to Single Ended . Unfortunately the IRQ pin stopped working so I have to use Pressure data . Pressure data shouldn't it be almost the same over the entire surface of display ?

Thank you for your help
Simion
Attachments
esp32_si_display_temp_dht22_v2_forum.zip
(14.14 KiB) Downloaded 35 times

Post Reply