A driver to allow for interaction with Resistive touch panel. More...
Public Member Functions | |
| def | __init__ (self, ym=pyb.Pin.board.PA0, xm=pyb.Pin.board.PA1, yp=pyb.Pin.board.PA6, xp=pyb.Pin.board.PA7) |
| Initializes the TouchPanel object with the correct pins and measurements. More... | |
| def | scan_X (self) |
| Scans the touch panel for the X value of the touch in mm relative to the center. More... | |
| def | scan_Y (self) |
| Scans the touch panel for the Y value of the touch in mm relative to the center. More... | |
| def | scan_Z (self) |
| Scans the touch panel to check if it detects anything. More... | |
| def | scan_ALL (self) |
| Scans the touch panel for all measurements. More... | |
Public Attributes | |
| ym | |
| xm | |
| yp | |
| xp | |
| length | |
| width | |
A driver to allow for interaction with Resistive touch panel.
This class defines methods to interact with a touch panel - measuring the X and Y position of a touch, as well as determining if anything is touching the panel.
| def touchPanel.TouchDriver.__init__ | ( | self, | |
ym = pyb.Pin.board.PA0, |
|||
xm = pyb.Pin.board.PA1, |
|||
yp = pyb.Pin.board.PA6, |
|||
xp = pyb.Pin.board.PA7 |
|||
| ) |
Initializes the TouchPanel object with the correct pins and measurements.
| ym | the pyb.pin for the minus y (y-) wire from the panel (default: pyb.Pin.board.PA0) |
| xm | the pyb.pin for the minus x (x-) wire from the panel (default: pyb.Pin.board.PA1) |
| yp | the pyb.pin for the plus y (y+) wire from the panel (default: pyb.Pin.board.PA6) |
| xp | the pyb.pin for the plus x (x+) wire from the panel (default: pyb.Pin.board.PA7) |
| def touchPanel.TouchDriver.scan_ALL | ( | self | ) |
Scans the touch panel for all measurements.
| def touchPanel.TouchDriver.scan_X | ( | self | ) |
Scans the touch panel for the X value of the touch in mm relative to the center.
| def touchPanel.TouchDriver.scan_Y | ( | self | ) |
Scans the touch panel for the Y value of the touch in mm relative to the center.
| def touchPanel.TouchDriver.scan_Z | ( | self | ) |
Scans the touch panel to check if it detects anything.