|
Adafruit TSC2046 Touchscreen Arduino Library
|
The type returned by Adafruit_TSC2046::getPoint. More...
#include <Adafruit_TSC2046.h>
Public Member Functions | |
| TSPoint (int16_t x, int16_t y, float z) | |
| Create a new TSPoint with these exact values. You usually don't need to call this constructor in user code. Call Adafruit_TSC2046::getPoint instead. More... | |
| float | xPercent () |
| The X-coordinate as a percentage. Note that physical touchscreens vary, and the range of yours may not perfectly extend from 0% to 100%. Like TSPoint::x, this value is meaningless if the touchscreen is not being touched. More... | |
| float | yPercent () |
| The Y-coordinate as a percentage. Note that physical touchscreens vary, and the range of yours may not perfectly extend from 0% to 100%. Like TSPoint::y, this value is meaningless if the touchscreen is not being touched. More... | |
Public Attributes | |
| int16_t | x |
| The full scale raw X coordinate from the touchscreen. For the X-coordinate as a percentage, see TSPoint::xPercent. If the touchscreen is not being touched, this value is meaningless. | |
| int16_t | y |
| The full scale raw Y coordinate from the touchscreen. For the Y-coordinate as a percentage, see TSPoint::yPercent. If the touchscreen is not being touched, this value is meaningless. | |
| float | z |
| The resistance measurement that corresponds to the pressure currently exerted on the touchscreen. The higher the pressure, the lower this resistance value will be. Unlike the X and Y coordinates, this value is not in an arbitrary unit of a full scale, but is a physical measurement, in Ohms (Ω). | |
The type returned by Adafruit_TSC2046::getPoint.
See the individual fields and methods for more information.
| TSPoint::TSPoint | ( | int16_t | x, |
| int16_t | y, | ||
| float | z | ||
| ) |
Create a new TSPoint with these exact values. You usually don't need to call this constructor in user code. Call Adafruit_TSC2046::getPoint instead.
| x | The value to initialize the X coordinate to. |
| y | The value to initalize the Y coordinate to. |
| z | The value to initalize the Z coordinate/pressure to. |
| float TSPoint::xPercent | ( | ) |
The X-coordinate as a percentage. Note that physical touchscreens vary, and the range of yours may not perfectly extend from 0% to 100%. Like TSPoint::x, this value is meaningless if the touchscreen is not being touched.
| float TSPoint::yPercent | ( | ) |
The Y-coordinate as a percentage. Note that physical touchscreens vary, and the range of yours may not perfectly extend from 0% to 100%. Like TSPoint::y, this value is meaningless if the touchscreen is not being touched.
1.8.13