12 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
  • Learn how to use the map() function
  • Create an on/off touch switch with a dimmer-style control

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

Touchscreens

Touchscreens can be quite expensive, but we’ll use an inexpensive model available from Adafruit (part numbers 333 and 3575), originally designed for the Nintendo DS game console.

This touchscreen, which measures about 2.45 by 3 inches, is shown ...

Get Arduino Workshop, 2nd Edition now with O’Reilly online learning.

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