MCUFRIEND_kbv Button example incorrect Press with Mega

Hello I am trying to use Button Sample example that came with MCUFRIEND_kbv.h library, and when I touch my buttons it only gets selected if I press 1 inch below the button
I am using Arduino Mega and experiencing this issue but When I use Uno it works as expected

Please help
here is the results from the calibrate example from mega
I copy pasted it to the code but still issue is there
additional details about the Touch screen
Making all control and bus pins INPUT_PULLUP
Typical 30k Analog pullup with corresponding pin
would read low when digital is written LOW
e.g. reads ~25 for 300R X direction
e.g. reads ~30 for 500R Y direction

Testing : (A2, D8) = 22
Testing : (A3, D9) = 42
ID = 0x9481

cx=201 cy=946 cz=262 X, Y, Pressure
cx=193 cy=600 cz=465 X, Y, Pressure
cx=193 cy=164 cz=545 X, Y, Pressure
cx=543 cy=956 cz=322 X, Y, Pressure
cx=548 cy=168 cz=510 X, Y, Pressure
cx=888 cy=947 cz=372 X, Y, Pressure
cx=888 cy=606 cz=539 X, Y, Pressure
cx=902 cy=169 cz=495 X, Y, Pressure

PORTRAIT CALIBRATION 320 x 480

*** COPY-PASTE from Serial Terminal:
const int XP=8,XM=A2,YP=A3,YM=9; //320x480 ID=0x9481
const int TS_LEFT=171,TS_RT=915,TS_TOP=966,TS_BOT=150;


Thanks in advance

Please read and use this link: How to get the best out of this forum - Development Tools / IDE 1.x - Arduino Forum

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.