Mechatronics
Documentation for ME 405 labs
TouchPanel.py File Reference

Driver for the Adafruit 8.75" touch panel. More...

Classes

class  drivers.TouchPanel.TouchPanel
 A class for collecting information from the touch panel over I2C. More...
 

Variables

list drivers.TouchPanel.INTERCEPT = [2008.5, 2120.3]
 Offsets to center of resistive touch panel. More...
 
list drivers.TouchPanel.SLOPE = [20.364, -30.05]
 Slope (adc counts per mm) for each coordinate.
 
int drivers.TouchPanel.LOW_THRESHOLD = 100
 Threshold for digital 'LOW' in adc counts.
 
 drivers.TouchPanel.panel = TouchPanel(Pin.cpu.A7, Pin.cpu.A6, Pin.cpu.A0, Pin.cpu.A1)
 
 drivers.TouchPanel.x_coord
 
 drivers.TouchPanel.y_coord
 
 drivers.TouchPanel.contacted
 
 drivers.TouchPanel.end
 

Detailed Description

Driver for the Adafruit 8.75" touch panel.

This driver is intended to be used with the Adafruit 8.75" Resistive Touch panel as mounted on the ME405 Lab0xFF platform. Default settings are based on calibration data taken May 25, 2021. Calibrations were taken by first laying out a grid on top of the touch panel with known real locations, then finding the average voltage (in adc counts) along each major line as shown below:

The default SLOPE and INTERCEPT arrays were calibrated using these plots:

Author
Tyler Olson
Date
June 5, 2021