CircuitPython library for 4-wire resistive touchscreens

  • Author(s): ladyada

Implementation Notes


Software and Dependencies:

class adafruit_touchscreen.Touchscreen(x1_pin, x2_pin, y1_pin, y2_pin, *, x_resistance=None, samples=4, z_threshhold=10000, calibration=None, size=None)

A driver for common and inexpensive resistive touchscreens. Analog input capable pins are required to read the intrinsic potentiometers


A tuple that represents the x, y and z (touch pressure) coordinates of a touch. Or, None if no touch is detected

adafruit_touchscreen.map_range(x, in_min, in_max, out_min, out_max)

Maps a number from one range to another. Note: This implementation handles values < in_min differently than arduino’s map function does. :return: Returns value mapped to new range :rtype: float