Capacitive I2C touch with RA8875 and adafruit FT6206 - Teensy 4.1

AntiLoop

Active member
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.


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 !!! 🎅🎅🎅
 
Glad you got it running. I am also working with the RA8875/FT5206 and similar to your experience I never got the FT5206 library working for unknown reasons. However, enabling FT5206 touch in the RA8875_t4 library worked for me.

(#define USE_FT5206_TOUCH in RA8875UserSettings.h)
 
Hi,
thanks for the help,
i did it and had to take over the other other RA8875 lib from the teensy libs installed with the main installation,
but #define USE_FT5206_TOUCH doesn't do anything...hope i have not a second RA8875 around the corner that override it :poop:

Anyway,from this moment i don't need gesture stuff,i will test if it doesn't interact with the sdcard and audio performances.
 
Hello KurtE,

i can't see any difference,nothing respond with the touch,i'm sorry
but the adafruit FT6206 works very smoothly and i'm glad there is no interact with 4.1 and I2S and SDCARD
the FT6206 is maybe an evolution from adafruit for the I2S touch
 
Now that works too with teensy 4.1 and audioboard together
but RA8875_CS needs to go to pin 36 because the conflict with the audiobard SDCARD_CS :10

RA8875 + I2C TOUCH + adafruit FT6206 + TEENSY 4X with or without AUDIOBOARD = PIECE OF CAKE !! 🍰🍰🍰

I2C TOUCH:
SERIAL MODE:
RA8875->1~2->TEENSY 4.1 VSS (GND)
RA8875->3~4->VDD (3,3V)
RA8875->5->SCS-CS-> (36 or 37 teensy 4X with audioboard),(10 with teensy 4.1 alone)
RA8875->6->SDO-MISO->12
RA8875->7->SDI-MOSI->11
RA8875->8->SCLK-SCK->13
RA8875->10-> INT ->2
RA8875->11-> RST ->255
RA8875->14-> BL CONTROL(Not Connected)

I2C TOUCH:
RA8875->34->SDA->18
RA8875->33->SCL->19
 
Last edited:
Back
Top