Introduction: 4-Wire Touch Screen Interfacing With Arduino
For more stuff visit my web site Steps2Make.com
This tutorial shows How to interface 4-wire touch screen using Arduino. This tutorial is useful for all microcontrollers to know how to interface Reisistive Touchscreen
Resistive touchscreen displays are composed of multiple layers that are separated by thin spaces. Pressure applied to the surface of the display by a finger or stylus causes the layers to touch, which completes electrical circuits and tells the device where the user is touching.
Step 1: Components Required and Connections
- Arduino UNO R3
- Connecting wires
- Laptop with arduino software
- USB cable for arduino
- Connect X1 to A0 of arduino
- Connect X2 to A1 of arduino
- Connect Y1 to A2 of arduino
- Connect Y2 to A3 of arduino
Visit my blog.circuits4you.com for step by step guide and more sensors interfacing with arduino
Step 2: How It Works ? and Programming
It works in 2 steps
Measure X axis Voltage
a. We are going to measure voltage on Y1
b. Make Y2 Tristate
c. Form a voltage divider in X1(+5V) and X2(GND)
d. Read the ADC from Y1 pin
X = (analogRead(Y1))/(1024/XYresolution);
Similarly Measure Y axis Voltage
a. We are going to measure voltage on X1
b. Make X2 Tristate
c. Form a voltage divider in Y1(+5V) and Y2(GND)
d. Read the ADC from X1 pin
Y = (analogRead(X1))/(1024/Yresolution);
Step 3: Final Output and Testing
Load the code in arduino and See the results in Serial Monitor
We have a be nice policy.
Please be positive and constructive.
I have interfaced touch screen and arduino . But when we touch , it display a large no. of input . Can’t it be like , if i touch once and i get one value for x and y?