9#ifndef AdafruitFT6206TouchScreen_h
10#define AdafruitFT6206TouchScreen_h
13#ifdef ADAFRUIT_FT6206_LIBRARY
18#include "TouchScreenAdapter.h"
43 TwoWire *theWire = &Wire, uint8_t i2c_addr = FT62XX_DEFAULT_ADDR) {
44 this->thresh = thresh;
46 this->i2c_addr = i2c_addr;
56 return ctp.begin(thresh, wire, i2c_addr);
66 TS_Point tsPoint = ctp.getPoint();
68 uint16_t x =
rotation % 2 ? tsPoint.y : tsPoint.x;
69 uint16_t y =
rotation % 2 ? tsPoint.x : tsPoint.y;
74 touchPoint.
z = tsPoint.z;
87 TS_Point p = ctp.getPoint();
95 Adafruit_FT6206 ctp = Adafruit_FT6206();
96 uint8_t thresh = FT62XX_DEFAULT_THRESHOLD;
97 TwoWire *wire = &Wire;
98 uint8_t i2c_addr = FT62XX_DEFAULT_ADDR;
Concrete implementation of TouchScreenAdapter for Adafruit's FT6206 TouchScreen class.
Definition: AdafruitFT6206TouchScreen.h:29
bool begin(void)
begin() Calls the FT6106 begin() method.
Definition: AdafruitFT6206TouchScreen.h:55
TouchScreenAdapter::TouchPoint getTouchPoint()
Get the Touch Point object.
Definition: AdafruitFT6206TouchScreen.h:65
AdafruitFT6206TouchScreen(uint8_t thresh=FT62XX_DEFAULT_THRESHOLD, TwoWire *theWire=&Wire, uint8_t i2c_addr=FT62XX_DEFAULT_ADDR)
Construct a new AdafruitFT6206TouchScreen Adapter.
Definition: AdafruitFT6206TouchScreen.h:42
TouchScreenAdapter::TouchPoint getTouchPointRaw()
Get the raw TouchPoint struct containing X/Y values directly from the underlyig library.
Definition: AdafruitFT6206TouchScreen.h:86
A lightweight abstract Abstract class for touch screen panels.
Definition: TouchScreenAdapter.h:19
uint16_t displayHeight
The (optionally rotated) height of the display in pixels.
Definition: TouchScreenAdapter.h:162
uint16_t displayWidth
The (optionally rotated) width of the display in pixels.
Definition: TouchScreenAdapter.h:161
uint8_t rotation
The current rotation of the touch panel. Default is 0 (native orientation).
Definition: TouchScreenAdapter.h:156
A consistent struct containing points X & Y plus Z as pressure.
Definition: TouchScreenAdapter.h:27
uint16_t x
Mapped 0 to screen width -1.
Definition: TouchScreenAdapter.h:47
uint16_t y
Mapped 0 to screen height -1.
Definition: TouchScreenAdapter.h:48
uint16_t z
Mapped 0-255 representing pressure (0 = not touched). is uint16_t because raw is odten > 255.
Definition: TouchScreenAdapter.h:49