|
| def | __init__ (self, xp, xm, yp, ym, w, l, xc, yc) |
| | Constructor for the touchscreen driver. More...
|
| |
|
def | Xscan (self) |
| | Returns the x coordinate of the touch input.
|
| |
|
def | Zscan (self) |
| | Returns a boolean output which measures if there is any input to the touchscreen.
|
| |
|
def | Yscan (self) |
| | Returns the y coordinate of the touch input.
|
| |
| def | coord (self) |
| | Returns the coordinates of the touch input and the time it takes to calculate. More...
|
| |
|
|
| xp |
| | An object copy of the X+ pin.
|
| |
|
| xm |
| | An object copy of the X- pin.
|
| |
|
| yp |
| | An object copy of the Y+ pin.
|
| |
|
| ym |
| | An object copy of the Y- pin.
|
| |
|
| w |
| | An object copy of the width of the touchscreen.
|
| |
|
| l |
| | An object copy of the length of the touchscreen.
|
| |
|
| xc |
| | An object copy of the X coordinate of the center of the touchscreen.
|
| |
|
| yc |
| | An object copy of the Y coordinate of the center of the touchscreen.
|
| |
|
| Xi |
| | Initializes the first X reading for the filter.
|
| |
| | Yi |
| | Initializes the first Y reading for the filter. More...
|
| |
|
| ADC_ym |
| |
◆ __init__()
| def tch_driver.touchscreen.__init__ |
( |
|
self, |
|
|
|
xp, |
|
|
|
xm, |
|
|
|
yp, |
|
|
|
ym, |
|
|
|
w, |
|
|
|
l, |
|
|
|
xc, |
|
|
|
yc |
|
) |
| |
Constructor for the touchscreen driver.
- Parameters
-
| xp | Input for the X+ pin on the FPC breakout board. |
| xm | Input for the X- pin on the FPC breakout board. |
| yp | Input for the Y+ pin on the FPC breakout board. |
| ym | Input for the Y- pin on the FPC breakout board. |
| w | Input for the width of the board in centimeters. |
| l | Input for the length of the board in centimeters. |
| xc | Input for the X coordinate of the center of the touchscreen. |
| yc | Input for the Y coordinate of the center of the touchscreen. |
◆ coord()
| def tch_driver.touchscreen.coord |
( |
|
self | ) |
|
Returns the coordinates of the touch input and the time it takes to calculate.
The coordinate system is returned in the format of (X, Y, Z). X and Y will be in the units specified by the given length and width and Z will be a boolean output which determines whether the touchscreen is being pressed. Z=1 means no input and Z=0 means an input is read. Additionally, this method returns total_time which is the total time it takes to run through the method returned in microseconds.
◆ Yi
| tch_driver.touchscreen.Yi |
Initializes the first Y reading for the filter.
Push Pull Output Pins initialized in Zscan() self.pin_yp = Pin(self.yp) self.pin_yp.init(mode=Pin.OUT_PP, value=1)
Floating Pins initialized in Zscan() self.pin_xp = Pin(self.xp, mode=Pin.IN) self.pin_xp.init(mode=Pin.ANALOG)
The documentation for this class was generated from the following file: