lovyan03 / LovyanGFX

SPI LCD graphics library for ESP32 (ESP-IDF/ArduinoESP32) / ESP8266 (ArduinoESP8266) / SAMD51(Seeed ArduinoSAMD51)
Other
1.03k stars 189 forks source link

touch not working IL9341 & xpt2046 #433

Closed cyberumut closed 9 months ago

cyberumut commented 9 months ago

hello dear, i m using esp32s3 with il9341 xpt2046 touch screen tft display working but touch not working can u help me ?

my config :

lovyan03 commented 9 months ago

XPT2046から得られる生の値はドットバイドットではありません。 とても大きく、300~4000程度の値が得られます。 したがって、あなたの以下の設定はタッチ座標が大きくずれます。

auto cfg = _touch_instance.config();
cfg.x_min = 0;
cfg.x_max = 239;
cfg.y_min = 0;
cfg.y_max = 319;

この部分の設定を変更し、x_maxとy_maxに4000に一旦設定して動作を確認するといいでしょう。 あるいはデフォルト値が設定されているので、この座標値の設定はコメントアウトしてもよいと思います。

cyberumut commented 9 months ago

i m setting this but still not working `

    auto cfg = _touch_instance.config();
    cfg.x_min = 0;  
    cfg.x_max = 4000; 
    cfg.y_min = 0; 
    cfg.y_max = 4000; 

`

lovyan03 commented 9 months ago

配線を間違えていませんか

cyberumut commented 9 months ago

配線を間違えていませんか

this module works with same wiring and pins but this dont using lovyan

https://github.com/nopnop2002/esp-idf-ili9340

lovyan03 commented 9 months ago

使用しているライブラリのバージョンが古いのではありませんか

cyberumut commented 9 months ago

使用しているライブラリのバージョンが古いのではありませんか

i m using 1.1.7

lovyan03 commented 9 months ago

使い方を間違えていませんか

cyberumut commented 9 months ago

使い方を間違えていませんか

tft display working but touch not work .

lcd.init(); // Initialize LovyanGFX lcd.initDMA(); // Init DMA lv_init(); // Initialize lvgl

lovyan03 commented 9 months ago

サンプルプログラムを使って動作を試して見てください

cyberumut commented 9 months ago

im using this lib but lovyan and lvgl updated last version https://github.com/sukesh-ak/ESP32-TUX/tree/37822a7b6dfcb67e278c78b2aa468817b6fa0bbe

lovyan03 commented 9 months ago

簡単なプログラムを使って動作を確かめてください。 私は他人が作ったプログラムのチェックをする気はありません。