david_prentice:
I have updated the sketch attached to #1607.
Please comment.David.
Here are my experiments:
Touchscreen ID: reg(0x0000) 93 25 ID: ILI9320, ILI9325, ILI9335, ... (TS that i used in post #1606)
1st Try:
TouchScreen.h 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) = 52
Testing : (A2, D6) = 32
Diagnosing as:-
YP,YM: (A1, D7) = 52
XM,XP: (A2, D6) = 32
cx=911 cy=974
cx=606 cy=977
cx=229 cy=982
cx=909 cy=832
cx=238 cy=904
cx=915 cy=628
cx=574 cy=814
cx=238 cy=844
Sketch is PORTRAIT 240 x 320
PORTRAIT CALIBRATION 240 x 320
x = map(p.x, LEFT=986, RT=752, 0, 240)
y = map(p.y, TOP=933, BOT=212, 0, 320)
Touch Pin Wiring XP=6 XM=A2 YP=A1 YM=7
LANDSCAPE CALIBRATION 320 x 240
x = map(p.y, LEFT=933, RT=212, 0, 320)
y = map(p.x, TOP=752, BOT=986, 0, 240)
2nd Try:
TouchScreen.h 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) = 53
Testing : (A2, D6) = 29
Diagnosing as:-
YP,YM: (A1, D7) = 53
XM,XP: (A2, D6) = 29
cx=911 cy=969
cx=586 cy=978
cx=235 cy=977
cx=902 cy=829
cx=231 cy=898
cx=909 cy=656
cx=563 cy=817
cx=274 cy=835
Sketch is PORTRAIT 240 x 320
PORTRAIT CALIBRATION 240 x 320
x = map(p.x, LEFT=983, RT=759, 0, 240)
y = map(p.y, TOP=929, BOT=223, 0, 320)
Touch Pin Wiring XP=6 XM=A2 YP=A1 YM=7
LANDSCAPE CALIBRATION 320 x 240
x = map(p.y, LEFT=929, RT=223, 0, 320)
y = map(p.x, TOP=759, BOT=983, 0, 240)
Touchscreen ID: reg(0x0000) 93 25 ID: ILI9320, ILI9325, ILI9335, ... (my Old TS)
1st Try:
TouchScreen.h 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) = 30
Testing : (A2, D6) = 26
Diagnosing as:-
YP,YM: (A1, D7) = 30
XM,XP: (A2, D6) = 26
cx=808 cy=909
cx=804 cy=552
cx=842 cy=153
cx=475 cy=895
cx=464 cy=182
cx=229 cy=873
cx=170 cy=540
cx=157 cy=163
Sketch is PORTRAIT 240 x 320
PORTRAIT CALIBRATION 240 x 320
x = map(p.x, LEFT=846, RT=156, 0, 240)
y = map(p.y, TOP=916, BOT=141, 0, 320)
Touch Pin Wiring XP=6 XM=A2 YP=A1 YM=7
LANDSCAPE CALIBRATION 320 x 240
x = map(p.y, LEFT=916, RT=141, 0, 320)
y = map(p.x, TOP=156, BOT=846, 0, 240)
2nd Try:
TouchScreen.h 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) = 29
Testing : (A2, D6) = 26
Diagnosing as:-
YP,YM: (A1, D7) = 29
XM,XP: (A2, D6) = 26
cx=828 cy=902
cx=807 cy=529
cx=849 cy=140
cx=456 cy=885
cx=474 cy=161
cx=175 cy=899
cx=162 cy=539
cx=167 cy=190
Sketch is PORTRAIT 240 x 320
PORTRAIT CALIBRATION 240 x 320
x = map(p.x, LEFT=858, RT=138, 0, 240)
y = map(p.y, TOP=919, BOT=138, 0, 320)
Touch Pin Wiring XP=6 XM=A2 YP=A1 YM=7
LANDSCAPE CALIBRATION 320 x 240
x = map(p.y, LEFT=919, RT=138, 0, 320)
y = map(p.x, TOP=138, BOT=858, 0, 240)
Your sketch is great! Many thanks!
nug.