ESP32 TFT display library

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Re: ESP32 TFT display library

Postby Deouss » Thu Aug 02, 2018 3:16 pm

Is there some register call to wait for Vsync ?
I am getting tearing effect after spi loads full tft frame

jstoefer
Posts: 3
Joined: Tue Nov 27, 2018 4:02 pm

Re: ESP32 TFT display library

Postby jstoefer » Tue Nov 27, 2018 4:06 pm

Hi,
since I am interested in using a ILI9341-based TFT with 3-wire IF, how is the state of support for 3-wire ?
Greetings, Jan

devleon
Posts: 2
Joined: Sun Mar 05, 2017 10:31 pm

Re: ESP32 TFT display library

Postby devleon » Mon Feb 11, 2019 12:49 am

JanJansen47 wrote:
Tue Jun 20, 2017 12:29 pm
I measured the signals with a scope and found a strange signal on the SDO from TFT and Touch (same line). I disconnected the SDO connection from the TFT and directly wired it to the Touch.
At least TFT and touch is working for now. ;) But it does not feel okay. So I ask the supplier.
My wiring is available on request.
Please share your wiring with us, as the poster before mentioned, it isn't quite clear what was meant.
I have a ER-TFTM035-6 and the touch also just doesn't seem to work. It only works when I disconnect SLC, SDO and SDI from the TFT completely. But then I have no tft, only touch.

ltbeck
Posts: 9
Joined: Sat Nov 10, 2018 4:21 pm

Re: ESP32 TFT display library

Postby ltbeck » Thu Mar 14, 2019 2:02 pm

I’m experimenting with this library using a ESP32 Pico kit v4.1 and this touchscreen TFT panel: https://raw.githubusercontent.com/lobor ... li9341.jpg

I have it hooked up this way:

• mosi: 23
• miso: 19
• sck: 18
• CS: 5 (display CS)
• DC: 26 (display DC)
• TCS: 25 (touch screen CS)

Reset and LED are tied high. MISO and MOSI are shared with T_DO and T_DI.

All of the TFT functions work great (displays the JPEGs, etc.) but the touch does not work, i.e using demo and a stylus, nothing appears on the screen. I’ve thrown in a few “printf’s” to see if the touch is detected and it appears that it is not.

Any hints?

Thanks,

Lance

chegewara
Posts: 2362
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 TFT display library

Postby chegewara » Fri Mar 15, 2019 6:01 am

I would like to thank @loboris for this library. Its easy to use and with it i build a toy for my autistic 3 years old nephew.

Recently i bought m5stack and since my nephew loves colors, numbers and read words he already knows i decided to use it.
Each button is generating random value and display it on screen:
- button 1 for colors, he knows colors in at least 3 languages,
- button 2 for numbers in range 0-100, he knows it in 2 languages already,
- button 3 for random words from preconfigured in app, for now i am using only Polish words, even if he knows words in other languages too.

Its very simple educational toy and he is very happy with it, thanks again.

huybk213
Posts: 13
Joined: Tue Jan 01, 2019 9:13 am

Re: ESP32 TFT display library

Postby huybk213 » Fri Jun 14, 2019 5:07 am

Hi every one,

I'm using ESP32 TFT display library with ST7789 driver.

But color was invert, for example when i call function TFT_fillWindow(TFT_BLACK) , the screen is WHITE, and TFT_fillWindows(TFT_RED) the screen is green.

I don't know why this problem happen.

jeremyjh
Posts: 4
Joined: Sun Sep 15, 2019 8:43 pm

Re: ESP32 TFT display library

Postby jeremyjh » Thu Sep 26, 2019 10:32 pm

@huybk213 Hopefully you figured it out, but for anyone else you just need to change the RGB settings; by default it uses GBR, to change to RGB in tftspi.h

Code: Select all

#define TFT_RGB_BGR 0x00
I also wanted to mention, anyone who wants to use this library with the 4.0 release branch, my fork supports this and also supports making all of these common config changes through menuconfig; so you can use that to set your controller, RGB options, touch mode etc. I also consolidated the open PRs in this branch.

https://github.com/jeremyjh/ESP32_TFT_library

User avatar
Segmentation Fault
Posts: 22
Joined: Sat Apr 04, 2020 1:49 am

Re: ESP32 TFT display library

Postby Segmentation Fault » Fri May 08, 2020 1:06 am

jeremyjh wrote:
Thu Sep 26, 2019 10:32 pm
@huybk213 Hopefully you figured it out, but for anyone else you just need to change the RGB settings; by default it uses GBR, to change to RGB in tftspi.h

Code: Select all

#define TFT_RGB_BGR 0x00
I also wanted to mention, anyone who wants to use this library with the 4.0 release branch, my fork supports this and also supports making all of these common config changes through menuconfig; so you can use that to set your controller, RGB options, touch mode etc. I also consolidated the open PRs in this branch.

https://github.com/jeremyjh/ESP32_TFT_library
Hi jeremyjh,

I am trying to use the library you have linked with esp-idf 4.0 on Eclipse CDT.
I am getting the following error when I am trying to build:

Code: Select all

Building in: C:\Users\User1\Dropbox\coding\ESP-IDF\Eclipse_IDE_C_C++\ESP32_TFT_library-master\build
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\Users\User1\esp-idf\tools\cmake\toolchain-esp32.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DIDF_TARGET=esp32 C:\Users\User1\Dropbox\coding\ESP-IDF\Eclipse_IDE_C_C++\ESP32_TFT_library-master
-- mconf-idf version mconf-v4.6.0.0-idf-20190628-win32
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Project version: 1
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
Python requirements from C:\Users\User1\esp-idf\requirements.txt are satisfied.
Loading defaults file C:/Users/User1/Dropbox/coding/ESP-IDF/Eclipse_IDE_C_C++/ESP32_TFT_library-master/sdkconfig.defaults...
C:/Users/User1/Dropbox/coding/ESP-IDF/Eclipse_IDE_C_C++/ESP32_TFT_library-master/sdkconfig.defaults:9 CONFIG_MAIN_TASK_STACK_SIZE was replaced with CONFIG_ESP_MAIN_TASK_STACK_SIZE
C:/Users/User1/Dropbox/coding/ESP-IDF/Eclipse_IDE_C_C++/ESP32_TFT_library-master/sdkconfig.defaults:10 CONFIG_TASK_WDT_TIMEOUT_S was replaced with CONFIG_ESP_TASK_WDT_TIMEOUT_S
-- Could NOT find Perl (missing: PERL_EXECUTABLE) 
-- Adding linker script C:/Users/User1/Dropbox/coding/ESP-IDF/Eclipse_IDE_C_C++/ESP32_TFT_library-master/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script C:/Users/User1/esp-idf/components/esp32/ld/esp32.project.ld.in
-- Adding linker script C:/Users/User1/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/Users/User1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/User1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/User1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script C:/Users/User1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/Users/User1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
CMake Error at C:/Users/User1/esp-idf/tools/cmake/component.cmake:280 (foreach):
  Syntax error in cmake code at

    C:/Users/User1/esp-idf/tools/cmake/component.cmake:280

  when parsing string

    C:/Users/User1/Dropbox/coding/ESP-IDF/Eclipse_IDE_C_C++/ESP32_TFT_library-master/main;C:\Users\User1\esp-idf\/components

  Invalid character escape '\U'.
Call Stack (most recent call first):
  C:/Users/User1/esp-idf/tools/cmake/component.cmake:447 (__component_add_include_dirs)
  main/CMakeLists.txt:2 (idf_component_register)


-- Configuring incomplete, errors occurred!
See also "C:/Users/User1/Dropbox/coding/ESP-IDF/Eclipse_IDE_C_C++/ESP32_TFT_library-master/build/CMakeFiles/CMakeOutput.log".
cmake --build . -- -v
ninja: error: loading 'build.ninja': The system cannot find the file specified.


Build complete (0 errors, 0 warnings): C:\Users\User1\Dropbox\coding\ESP-IDF\Eclipse_IDE_C_C++\ESP32_TFT_library-master\build
Could you help me with that?

VadimKHL
Posts: 11
Joined: Thu May 21, 2020 1:19 am

Re: ESP32 TFT display library

Postby VadimKHL » Thu Sep 23, 2021 6:24 pm

Hello everyone!
Please help me start the XPT2046 touch controller.
I am using the following screen:

https://aliexpress.ru/item/100500167669 ... hweb201603_

The sample code works, but the touch controller does not work.

VadimKHL
Posts: 11
Joined: Thu May 21, 2020 1:19 am

Re: ESP32 TFT display library

Postby VadimKHL » Thu Sep 23, 2021 6:30 pm

In tftspi.h enable tooch:
#define USE_TOUCH TOUCH_TYPE_XPT2046

Connected:
#define PIN_NUM_MISO 19
#define PIN_NUM_MOSI 23
#define PIN_NUM_CLK 18
#define PIN_NUM_CS 5
#define PIN_NUM_DC 26
#define PIN_NUM_TCS 25

Toch:
T_DO -> 19
T_DIN -> 23
T_CLK -> 18
T_CS -> 25

But the touch controller does not work.

Who is online

Users browsing this forum: No registered users and 29 guests