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

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.