Adafruit TouchScreen
|
#include <TouchScreen.h>
Public Member Functions | |
TouchScreen (uint8_t xp, uint8_t yp, uint8_t xm, uint8_t ym, uint16_t rx) | |
Construct a new Touch Screen object. More... | |
bool | isTouching (void) |
NOT IMPLEMENTED Test if the screen has been touched More... | |
uint16_t | pressure (void) |
Read the touch event's Z/pressure value. More... | |
int | readTouchY () |
Read the touch event's Y value. More... | |
int | readTouchX () |
Read the touch event's X value. More... | |
TSPoint | getPoint () |
Measure the X, Y, and pressure and return a TSPoint with the measurements. More... | |
Public Attributes | |
int16_t | pressureThreshhold |
Pressure threshold for isTouching | |
Object that controls and keeps state for a touch screen.
TouchScreen::TouchScreen | ( | uint8_t | xp, |
uint8_t | yp, | ||
uint8_t | xm, | ||
uint8_t | ym, | ||
uint16_t | rx = 0 |
||
) |
Construct a new Touch Screen object.
xp | X+ pin. Must be an analog pin |
yp | Y+ pin. Must be an analog pin |
xm | X- pin. Can be a digital pin |
ym | Y- pin. Can be a digital pin |
rx | The resistance in ohms between X+ and X- to calibrate pressure sensing |
bool TouchScreen::isTouching | ( | void | ) |
NOT IMPLEMENTED Test if the screen has been touched
uint16_t TouchScreen::pressure | ( | void | ) |
Read the touch event's Z/pressure value.
int TouchScreen::readTouchY | ( | void | ) |
Read the touch event's Y value.
int TouchScreen::readTouchX | ( | void | ) |
Read the touch event's X value.
TSPoint TouchScreen::getPoint | ( | void | ) |