Hi everybody,
I never succeeded using the FT5206 library with my buydisplay 7" RA8875 - 4 Wire - I2C touch,i don't know why,it's a mistery to me,
so i had a try with the FT6206 adafruit library,and bingo it worked at the first time,without needing any pullup resistances or
pinMode settings.
github.com
Here's a little sketch i adapted with a little paint procedure to ensure the coordonnates:
```
#include <SPI.h>
#include <RA8875.h>
#include <Wire.h>
#include <Adafruit_FT6206.h>
// The FT6206 uses hardware I2C (SCL/SDA)// SDA=18, SCL=19
Adafruit_FT6206 ts = Adafruit_FT6206();
#define RA8875_CS 10
#define RA8875_RESET 23
#define RA8875_INT 2
RA8875 tft = RA8875(RA8875_CS, RA8875_RESET);
void setup(){
Serial.begin(115200);
// begin display: Choose from: RA8875_480x272, RA8875_800x480, RA8875_800x480ALT, Adafruit_480x272, Adafruit_800x480
tft.begin(RA8875_800x480);
if (!ts.begin(40)) {
Serial.println("Unable to start touchscreen."); // --> i omit this message because it works!!
}
else {
Serial.println("Touchscreen started.");
}
tft.setRotation(0);
tft.fillWindow(RA8875_BLUE);//fill window black
}
void loop(){
// See if there's any touch data for us
if (ts.touched())
{
// Retrieve a point
TS_Point p = ts.getPoint();
p.x = map(p.x, 0, 800,0,800);
p.y = map(p.y, 0, 480, 480,0);
int y = tft.height() - p.y;
int x = p.x;
Serial.print("x->");
Serial.println(p.x);
Serial.print("y->");
Serial.println(p.y);
tft.setFontScale(1);
tft.fillCircle(x, y, 5, RA8875_WHITE);
tft.setCursor(CENTER,CENTER);
tft.setTextColor(RA8875_WHITE);
tft.print("Touched!");
}
}
```
Happy christmas and happy new year to all !!!


I never succeeded using the FT5206 library with my buydisplay 7" RA8875 - 4 Wire - I2C touch,i don't know why,it's a mistery to me,
so i had a try with the FT6206 adafruit library,and bingo it worked at the first time,without needing any pullup resistances or
pinMode settings.
GitHub - adafruit/Adafruit_FT6206_Library: Arduino library for FT6206-based Capacitive touch screen
Arduino library for FT6206-based Capacitive touch screen - adafruit/Adafruit_FT6206_Library
Here's a little sketch i adapted with a little paint procedure to ensure the coordonnates:
```
#include <SPI.h>
#include <RA8875.h>
#include <Wire.h>
#include <Adafruit_FT6206.h>
// The FT6206 uses hardware I2C (SCL/SDA)// SDA=18, SCL=19
Adafruit_FT6206 ts = Adafruit_FT6206();
#define RA8875_CS 10
#define RA8875_RESET 23
#define RA8875_INT 2
RA8875 tft = RA8875(RA8875_CS, RA8875_RESET);
void setup(){
Serial.begin(115200);
// begin display: Choose from: RA8875_480x272, RA8875_800x480, RA8875_800x480ALT, Adafruit_480x272, Adafruit_800x480
tft.begin(RA8875_800x480);
if (!ts.begin(40)) {
Serial.println("Unable to start touchscreen."); // --> i omit this message because it works!!
}
else {
Serial.println("Touchscreen started.");
}
tft.setRotation(0);
tft.fillWindow(RA8875_BLUE);//fill window black
}
void loop(){
// See if there's any touch data for us
if (ts.touched())
{
// Retrieve a point
TS_Point p = ts.getPoint();
p.x = map(p.x, 0, 800,0,800);
p.y = map(p.y, 0, 480, 480,0);
int y = tft.height() - p.y;
int x = p.x;
Serial.print("x->");
Serial.println(p.x);
Serial.print("y->");
Serial.println(p.y);
tft.setFontScale(1);
tft.fillCircle(x, y, 5, RA8875_WHITE);
tft.setCursor(CENTER,CENTER);
tft.setTextColor(RA8875_WHITE);
tft.print("Touched!");
}
}
```
Happy christmas and happy new year to all !!!