Touch TFT, 2.8 inch with capacitive touch
A 2.8 inch 240 by 320 color TFT on an ILI9341, with an FT6206 capacitive touch controller on I2C.
It matches Adafruit's 2.8 inch cap-touch display and the modules like it. Aliases: capacitive touchscreen, FT6206, cap touch TFT.
Pins
| Pin | What it does |
|---|---|
VCC, GND |
Supply. |
CS, RST, DC, MOSI, SCK, MISO |
The display's SPI bus, as on the ILI9341. |
LED |
The backlight: low puts it out. |
SCL, SDA |
The touch controller's I2C bus, address 0x38. |
While it runs
Press on the picture and drag: that is a finger on the glass.
Reading it on an Arduino
With Adafruit_ILI9341.h for the display and Adafruit_FT6206.h for the touch:
#include <Adafruit_ILI9341.h>
#include <Adafruit_FT6206.h>
Adafruit_ILI9341 tft(10, 9, 8);
Adafruit_FT6206 ctp;
void setup() {
tft.begin();
ctp.begin(40);
}
void loop() {
if (ctp.touched()) {
TS_Point p = ctp.getPoint();
p.x = map(p.x, 0, 240, 240, 0); // the film is the other way up
p.y = map(p.y, 0, 320, 320, 0);
tft.fillCircle(p.x, p.y, 3, ILI9341_YELLOW);
}
}
What the model gets right
The display is the ILI9341 model. The touch controller answers FocalTech's registers: the vendor and chip IDs the library checks, the touch count, and the point in pixels with its press, contact and lift flags, all read in one go. The point is the other way up from the display's memory, as on the real module, which is why every example turns it round.
What it does not model
A second finger, gestures, the threshold's effect, and the controller's interrupt and reset lines, which this board does not bring out.
Common mistakes
Forgetting to flip the point: the dot appears in the opposite corner.
Rotating the display and not the touch: the film does not rotate with
setRotation().
See it in action
Cap touch draws where you touch. Open it at /templates.