Arduino ESP32 TFT test:
With special TFT_eSPI
Proposed ports modified
Then upload from Test_Touch_Controller.ino
Comes with error missing TFT_driver ILI9341 driver
Copied from original TFT_eSPI
Upload again, then missing touch.h file in extensions
Also copied from original
Then upload, no errors
Then serial monitor: x:8191 Y:8191 z:4095
setup_user.h modified to ST7796 driver
Same output
In setup_user.h
#define TFT_RST 12 modified #define TFT_RST -1
Then output x:0 y:0 z:4095
With sketch demo_3D_cube white screen
Tried different drivers, no success
Then command #define USE_SEPERATE_TOUCH_BUS out, then sketch will work with your Library.
Next test:
In the user_setup.h the line //#define TFT_MISO 12 is commanded out
Then upload the following sketch:
#include <TFT_eSPI.h>
#include <TAMC_GT911.h>
#include <DigitalRainAnimation.hpp>
#define TOUCH_SDA 33
#define TOUCH_SCL 32
#define TOUCH_INT 21
#define TOUCH_RST 25
#define TOUCH_WIDTH 320
#define TOUCH_HEIGHT 240
TAMC_GT911 tp = TAMC_GT911(TOUCH_SDA, TOUCH_SCL, TOUCH_INT, TOUCH_RST, TOUCH_WIDTH, TOUCH_HEIGHT);
TFT_eSPI tft = TFT_eSPI();
DigitalRainAnimation<TFT_eSPI> matrix_effect = DigitalRainAnimation<TFT_eSPI>();
void setup() {
Serial.begin(115200);
Serial.println("TAMC_GT911 Example: Ready");
tp.begin();
tp.setRotation(ROTATION_NORMAL);
tft.begin();
tft.setRotation(0);
matrix_effect.init(&tft);
matrix_effect.setTextColor(0, 0, 255);
matrix_effect.setHeadCharColor(0, 255, 255);
}
void loop() {
matrix_effect.loop();
tp.read();
if (tp.isTouched){
for (int i=0; i<tp.touches; i++){
Serial.print("Touch ");Serial.print(i+1);Serial.print(": ");;
Serial.print(" x: ");Serial.print(tp.points[i].x);
Serial.print(" y: ");Serial.print(tp.points[i].y);
Serial.print(" size: ");Serial.println(tp.points[i].size);
Serial.println(' ');
}
}
}
Screen has the matrix affect and i have touchscreen output in monitor