Chapter 10. Accepting User Input with Touchscreens

In this chapter you will

  • Learn how to connect a resistive touchscreen to your Arduino

  • Discover the values that can be returned from the touchscreen

  • Create a simple on/off touch switch

  • Create an on/off touch switch with a dimmer-style control

We see touchscreens everywhere today: smartphones, tablets, and portable video-game systems. So why not use a touchscreen to accept input from a user?


Touchscreens can be quite expensive, but we’ll use an inexpensive model available from SparkFun (part numbers LCD-08977 and BOB-09170), originally designed for the Nintendo DS game console.

This touchscreen, which measures about 2 by 2 3/4 inches, is shown mounted on a breadboard in Figure 10-1.

Figure 10-1. Touchscreen ...

Get Arduino Workshop now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.