Closed astorun closed 1 year ago
I can also confirm that touch driver works with TAMC GT911 library for arduino but not with LovyanGFX GT911 driver.
The INT pin is not functional on that board. Strictly speaking, there is a wiring pattern on the board, but R25 is not mounted and not conducting.
// cfg.pin_int = 21; // bad setting
cfg.pin_int = -1; // good setting
it is very painful to be forced to debug hardware defects.
I just tried with setting the cfg.pin_int = -1; but still it does not work.
It works with TAMC library for some reason with proper pin setup.
However I also get this wire error on serial monitor when used with TAMC library.
[E][Wire.cpp:513] requestFrom(): i2cRead returned Error 263
However if I add a delay around 500ms on setup function with the following lines of code it works without any errors.
void touchpad_setup() {
//Serial.println("TAMC_GT911 Example: Ready");
pinMode(TOUCH_SCL, OUTPUT);
pinMode(TOUCH_SDA, OUTPUT);
pinMode(TOUCH_RST, OUTPUT);
digitalWrite(TOUCH_SCL, HIGH);
digitalWrite(TOUCH_SDA, HIGH);
digitalWrite(TOUCH_RST, HIGH);
digitalWrite(TOUCH_SCL, LOW);
digitalWrite(TOUCH_SDA, LOW);
digitalWrite(TOUCH_RST, LOW);
delay(500);
tp.begin();
tp.setRotation(ROTATION_RIGHT);
}
Seems like it needs some time to clear and initialize the i2c bus during boot?. Maybe it is something you might want to explore since those displays are very popular now and selling like hotcakes.
I am not an expert on programming but this is just my guess.
The code for LVGL and other application parts is in the way. Please provide minimal code that is buildable and reproducible. Don't force us to work to decipher the code.
Try this example setup and see
The code for LVGL and other application parts is in the way. Please provide minimal code that is buildable and reproducible. Don't force us to work to decipher the code.
Sorry for the confusion. I assumed LVGL is a standard way to operate the LovyanGFX since everybody uses it like that nowadays. Friendly suggestion: You should consider adding more examples, built- in display support and use case scenarios with different libraries, especially LVGL, since it is a very popular library to implement GUI and LovyanGFX is the fastest option to use with it.
Moreover the code you provided works great! Thanks for the help!
Hi there,
I am trying to run the LovyanGFX with Sunton ESP3248S035 with Capacitive touch support using GT911 driver. Display works fine but I cannot make it work with the touch drivers. Could you check if there is something wrong with the code?
According to documentation touch screen pins are like this: INT: 21 RST:25 SCL:32 SDA:33
I cannot find any information about driver address of GT911 but I am not sure if it is required.
Code I am using:
Carefully written requests are more likely to be given priority. 丁寧に記述された要望は優先して対応される可能性が高くなります。
Device Name (デバイスの名称・型番等)
Sunton 3.5" 320*480 Smart Display Screen 3.5inch LCD TFT Module - Capacitive touch version
URL of Device Specifications document (仕様書等のURL)
http://www.jczn1688.com/zlxz?spm=a2g0o.detail.1000023.1.1d4528faY71ytG Download password: jczn1688
URL of the store where we can purchase (商品を購入できるURL)
https://www.aliexpress.us/item/3256804446638703.html?spm=a2g0o.order_list.order_list_main.21.550b18020VEe0G&gatewayAdapt=glo2usa&_randl_shipto=US