We need to calibrate the touch screen by finding a formula to convert voltage values to coordinate values.

Touch screen and LCD are two different things, touch screen over LCD.

Q: How to convert LCD (x, y) to the electric shock (x1, y1)?

The X axis direction

S1 prime is the distance between the two points on the X axis on TS

S1 is the distance between two points on the X-axis of the LCD

S2 s2 ‘

Kx= LCD distance/touchscreen distance

= (s1 + s2)/(s1 ‘+ s2’)

= 2 s/(s1 + s2 ‘ ‘)

Y direction

TS distance is d1 prime

The LCD distance is D1

Ky=(d1 + d2)/(d1 ‘+ d2’)

= 2d/(d1 ‘+ d2’)

So now we have the slope, given a coordinate, we need the touchscreen LCD coordinates that need the origin

We’re going to go to the center of the origin so we can ignore the deviation up, down, left, and right

The origin coordinates are xC prime yC on the touch screen, xC yc on the LCD, so our calibration formula, given x3, how do we solve for x

X is equal to x3 minus xc prime times Kx plus xc

Y is equal to y prime minus yc prime times Ky plus yc

We need to click the five points on the touch screen, and print out the coordinates of the five points.