Touch Screens. Part 2.

In previous ARTICLE we saw how a four wire resistive touch surface works, and the logic we must implement in order to interface it with a microcontroller. We will see now how is the real implementation with an Arduino and C language. The circuit is really simple. We only have to connect the four wires to the Arduino. Xa to Α0 (PC0 of ATmega328p), Xb to 8 (PΒ0 of ATmega328p), Xb στο Α1 (PC1 of ATmega328p) το Xb to 9 (PΒ1 of ATmega328p).

DSC02588 DSC02590

The code is really simple and well commented. The only the firmware does is to calculate the coordinates of the touch point and sent those data to the UART. Then it can be read by any pc software that can open a serial port, for example. In my case, a simple Python script, that prints the coordinates to stdout.

All the files can be found HERE.

Advertisements
This entry was posted in AVR, Electronics, Science and tagged , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s