I have a 4 wire resistive touch screen, I have been trying without much luck to get the arduino to read the x and y coordinates of a touch,
to act as the touch screen controller. Currently I can get the arduino to read the x or y coordinates separately when a touch is made.
But i will need to read x and y at the same time. As any one had experience with setting up the arduino for this task.
It will involve using electronic switches to change Input voltages from x+ axis to y+ axis and x- to ground. y- to ground.
Any information would be appreciated
Thanks in advance
Use two NPN transistor to pull the appropriate ground side down. Then use two PNP transistors to putt the appropriate +ve side up. With of course a 3K3 (or so) resistor in the base of each. That will take four I/O lines, you could get fancy and reduce that to two by using an other couple of transistors. Alternatively you can use an analogue switch IC like the 74HC4052 to pull them to the right level.
But i will need to read x and y at the same time.
You can't read x and y at the same time - but you can read them quickly one after the other.
You cab do this with 4 i/o pins from the arduino. The arduino should be able to drive it directly.
There was a thread on this a few months back ... i'll see if I can find it.
edit: here it is: