Touch panel class used to hold panel parameters, detect touches, and calculate touch location.
More...
|
| def | __init__ (self, xp, xm, yp, ym, p_len, p_width, center, res=0xfff, delay=3) |
| |
|
def | xScan (self) |
| | Return x position [mm].
|
| |
|
def | yScan (self) |
| | Return y position [mm].
|
| |
|
def | zScan (self) |
| | Detect touch/no touch.
|
| |
|
def | scan (self) |
| | Return the results of all three scans as a tuple.
|
| |
|
def | filter (self) |
| | signal filtering for later implementation
|
| |
|
|
| xp |
| |
|
| xm |
| |
|
| yp |
| |
|
| ym |
| |
|
| p_len |
| |
|
| p_width |
| |
|
| ox |
| |
|
| oy |
| |
|
| res |
| |
|
| delay |
| |
|
| hiPin |
| |
|
| loPin |
| |
|
| vPin |
| |
|
| fPin |
| |
Touch panel class used to hold panel parameters, detect touches, and calculate touch location.
◆ __init__()
| def lab07.TouchPanel.__init__ |
( |
|
self, |
|
|
|
xp, |
|
|
|
xm, |
|
|
|
yp, |
|
|
|
ym, |
|
|
|
p_len, |
|
|
|
p_width, |
|
|
|
center, |
|
|
|
res = 0xfff, |
|
|
|
delay = 3 |
|
) |
| |
- Parameters
-
| xp | pin registered to xp |
| xm | pin registered to xm |
| yp | pin registered to yp |
| ym | pin registered to ym |
| p_len | panel length |
| p_width | panel width |
| ADC | center values (from testing) |
| ox | coordinate of panel origin (center) |
| oy | coordinate of panel origin (center) |
| res | resolution of adc |
| delay | read delay to ensure signal settled |
The documentation for this class was generated from the following file: