Thank for this David.
I was looking in the code to make these changes in order to change the colors.
But i don't know much about C programming. (You see i am not a programer just learn thinks by myself)
Anyway now the calibration test example works fine and it is shown cross-hair as you say (all blue , highligtede white and finished red)
After tha the serial monitor shows me:
TouchScreen.h GFX Calibration
Making all control and bus pins ITouchScreen.h GFX Calibration
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 : (A1, D7) = 26
Testing : (A2, D6) = 45
Diagnosing as:-
XM,XP: (A1, D7) = 26
YP,YM: (A2, D6) = 45
ID = 0x9340
TouchScreen.h GFX Calibration
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 : (A1, D7) = 26
Testing : (A2, D6) = 45
Diagnosing as:-
XM,XP: (A1, D7) = 26
YP,YM: (A2, D6) = 45
ID = 0x9340
cx=217 cy=207 cz=627 LEFT, TOP, Pressure
cx=213 cy=512 cz=557 LEFT, MIDH, Pressure
cx=204 cy=792 cz=401 LEFT, BOT, Pressure
cx=554 cy=218 cz=695 MIDW, TOP, Pressure
cx=539 cy=790 cz=483 MIDW, BOT, Pressure
cx=872 cy=219 cz=702 RT, TOP, Pressure
cx=879 cy=503 cz=648 RT, MIDH, Pressure
cx=875 cy=789 cz=557 RT, BOT, Pressure
MCUFRIEND_kbv ID=0x9340 240 x 320
const int XP=7,XM=A1,YP=A2,YM=6; //240x320 ID=0x9340
const int TS_LEFT=180,TS_RT=905,TS_TOP=194,TS_BOT=809;
PORTRAIT CALIBRATION 240 x 320
x = map(p.x, LEFT=180, RT=905, 0, 240)
y = map(p.y, TOP=194, BOT=809, 0, 320)
Touch Pin Wiring XP=7 XM=A1 YP=A2 YM=6
LANDSCAPE CALIBRATION 320 x 240
x = map(p.y, LEFT=194, RT=809, 0, 320)
y = map(p.x, TOP=905, BOT=180, 0, 240)
After copy-paste the 2 const int lines in the Touch_Shield_new.ino example everythig seems to works fine.
Now my display works as it should.
Thank you David for your help and your great library and examples.
Yannis.