|
|
| xp |
| | Pin object to be used for x positive.
|
| |
|
| xm |
| | Pin object to be used for x negative.
|
| |
|
| yp |
| | Pin object to be used for y positive.
|
| |
|
| ym |
| | Pin object to be used for y negative.
|
| |
|
| width |
| | Variable defining the width of the touch panel in mm.
|
| |
|
| height |
| | Variable defining the height of the touch panel in mm.
|
| |
|
| center_x |
| | Variable defining the measured x-axis center of the touch panel in mm.
|
| |
|
| center_y |
| | Variable defining the measured y-axis center of the touch panel in mm.
|
| |
|
| z_bound |
| | Variable defining the adc threshold for touch panel contact.
|
| |
|
| x_max |
| | Varaible defining the max adc output along the x-axis.
|
| |
|
| x_min |
| | Variable defining the min adc output along the x-axis.
|
| |
|
| y_max |
| | Variable defining the max adc output along the y-axis.
|
| |
|
| y_min |
| | Variable defining the min adc output along the y-axis.
|
| |
|
| adc_ym |
| | ADC object reading output from y negative pin on touch panel.
|
| |
|
| x_val |
| | Variable storing the x position ADC output from touch panel.
|
| |
|
| x_mm |
| | Variable storing the converted and zeroed ADC output for x position.
|
| |
|
| adc_xm |
| | ADC object reading output from x negative pin on touch panel.
|
| |
|
| y_val |
| | Variable storing the y position ADC output from touch panel.
|
| |
|
| y_mm |
| | Variable storing the converted and zeroed ADC output for y position.
|
| |
|
| z_val |
| | Variable storing the z ADC output from touch panel.
|
| |
◆ __init__()
| def Touch_Panel_Driver.Touch_Panel.__init__ |
( |
|
self, |
|
|
|
xp, |
|
|
|
xm, |
|
|
|
yp, |
|
|
|
ym, |
|
|
|
width, |
|
|
|
height, |
|
|
|
center_x, |
|
|
|
center_y |
|
) |
| |
@param xp Pin to be used for positive X direction.
@param xm Pin to be used for negative X direction.
@param yp Pin to be used for positive Y direction.
@param ym Pin to be used for negative Y direction.
@param width Panel width in mm, corresponds to X axis.
@param height Panel height in mm, corresponds to Y axis.
@param center_x Panel center coordinate in mm, X direction.
@param center_y Panel center coordinate in mm, Y direction.
◆ Get_Pos()
| def Touch_Panel_Driver.Touch_Panel.Get_Pos |
( |
|
self | ) |
|
Generates tuple describing contact position on touch panel.
@details This method uses the Scan_x, Scan_y, and Scan_z methods to
generate a tuple which indicates if there is contact and
the location of the contact.
@return Returns a tuple with (x_position, y_position, contact T/F).
◆ Scan_x()
| def Touch_Panel_Driver.Touch_Panel.Scan_x |
( |
|
self | ) |
|
Finds the x position of contact on touch panel.
@details The four touch panel pins are defined to find the x position
of contact on the touch panel. This requires the positive x
pin be set to input, x negative pin be set to ground, y
positive pin be set to analog, and y negative pin be set
to ADC. The ADC reading is then converted to mm and zeroed
using the defined panel x center.
@return Method returns zeroed x contact position on touch panel.
◆ Scan_y()
| def Touch_Panel_Driver.Touch_Panel.Scan_y |
( |
|
self | ) |
|
Finds the x position of contact on touch panel.
@details The four touch panel pins are defined to find the y position
of contact on the touch panel. This requires the positive y
pin be set to input, y negative pin be set to ground, x
positive pin be set to analog, and x negative pin be set
to ADC. The ADC reading is then converted to mm and zeroed
using the defined panel y center.
@return Method returns zeroed y contact position on touch panel.
◆ Scan_z()
| def Touch_Panel_Driver.Touch_Panel.Scan_z |
( |
|
self | ) |
|
Determines if there is contact on the touch panel.
@details The four touch panel pins are defined to determine if the
touch panel is experiencing contact. This requires the positive y
pin be set to input, x negative pin be set to ground, x
positive pin be set to analog, and y negative pin be set
to ADC. The ADC reading is then converted to mm and zeroed
using the defined panel y center.
@return This method returns either a true or false depending on contact.
The documentation for this class was generated from the following file: