Replies: 3 comments 1 reply
-
|
The cst816d driver would also be handy. See this thread https://community.home-assistant.io/t/esp32-c3-with-integrated-gc9a01-cheap-touch-controller/610314/61 |
Beta Was this translation helpful? Give feedback.
-
|
Guys I found libraries for arduino, but cant get it to work. Your help is highly appreciated. |
Beta Was this translation helpful? Give feedback.
-
|
Finally got it working: https://youtube.com/shorts/ETgz38GRDS4?feature=share |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Couldn't find place where to request feature to be embedded.
I have purchased pretty nice 2.4'' TFT with capacitive touch and many other IO connectors.
TFT is drıven by ILI9341 chip, there is no probs modyfying existing boards in openHASP to get it working, I have uncommented esp32-3248s035c as it's pins perfectly matches my board setup and it has capacitive support but using different chip for that (911)
I had to change board driver too to get it working. Below is my ini file setup:
`;;
; Sunton ESP32-WROOM custom dev board with ;
; - ST7796 TFT SPI 4-WIRE ;
; - XPT2046 or GT911 touch controller ;
;;
[esp32-3248s035]
extends = arduino_esp32_v2
board = esp32dev
build_flags =
${arduino_esp32_v2.build_flags}
${esp32.no_ps_ram}
;region -- TFT_eSPI build options ------------------------
${esp32.hspi} ; Use HSPI hardware SPI bus
; -D USER_SETUP_LOADED=1
-D LGFX_USE_V1=1
-D ILI9341_DRIVER=1
-D TFT_ROTATION=0 ; 0=0, 1=90, 2=180 or 3=270 degree
-D TFT_WIDTH=240
-D TFT_HEIGHT=320
-D TFT_RST=-1
-D TFT_SCLK=14
-D TFT_DC=2
-D TFT_CS=15
-D TFT_MOSI=13
-D TFT_MISO=12
-D TFT_BCKL=27
-D SUPPORT_TRANSACTIONS
-D SPI_FREQUENCY=55000000
-D SPI_READ_FREQUENCY=20000000
;endregion
; -- Debugging options -----------------------------
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
[env:esp32-3248s035r_4MB]
extends = esp32-3248s035, flash_4mb
build_flags =
${esp32-3248s035.build_flags}
-D USER_SETUP_LOADED=1
-D TOUCH_CS=33
-D TOUCH_DRIVER=0x2046 ; XPT2606 Resistive touch panel driver
-D HASP_USE_LGFX_TOUCH=1
-D TOUCH_SDA=-1
-D TOUCH_SCL=-1
-D TOUCH_IRQ=-1
-D I2C_TOUCH_PORT=0
-D I2C_TOUCH_ADDRESS=0
-D I2C_TOUCH_FREQUENCY=0
-D SPI_TOUCH_FREQUENCY=2500000
lib_deps =
${esp32-3248s035.lib_deps}
${tft_espi.lib_deps}
;${lovyangfx.lib_deps}
[env:esp32-3248s035c_4MB]
extends = esp32-3248s035, flash_4mb
board = esp32dev
build_flags =
${esp32-3248s035.build_flags}
${esp32.no_ps_ram}
;region -- TFT_eSPI build options ------------------------
${esp32.hspi} ; Use HSPI hardware SPI bus
;-D USER_SETUP_LOADED=1
-D LGFX_USE_V1=1
-D ILI9341_DRIVER=1
-D TOUCH_DRIVER=0x0820 ; CST Capacitive I2C touch panel driver
-D HASP_USE_LGFX_TOUCH=1
-D TFT_ROTATION=2 ; 0=0, 1=90, 2=180 or 3=270 degree
-D TFT_WIDTH=240
-D TFT_HEIGHT=320
-D TFT_CS=15 ;// Chip select control pin
-D TFT_DC=2 ;// Data Command control pin
-D TFT_RST=-1 ;// Reset pin (could connect to RST pin)
-D TFT_BCKL=27 ;None, configurable via web UI (e.g. 2 for D4)
-D SUPPORT_TRANSACTIONS
-D TOUCH_SDA=33
-D TOUCH_SCL=32
-D TOUCH_INT=21
-D TOUCH_RST=25
;-D I2C_TOUCH_FREQUENCY=400000
-D I2C_TOUCH_PORT=1
-D I2C_TOUCH_ADDRESS=0x15 ; or 0x14
-D SPI_TOUCH_FREQUENCY=2500000
-D SPI_READ_FREQUENCY=20000000
-D TFT_SCLK=14
-D TFT_MOSI=13
-D TFT_MISO=12
-D SPI_FREQUENCY=55000000
-D SPI_READ_FREQUENCY=20000000
;endregion
; -- Debugging options -----------------------------
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
lib_deps =
${esp32-3248s035.lib_deps}
;${tft_espi.lib_deps}
${lovyangfx.lib_deps}
;${goodix.lib_deps}
`
However touch drıver used on my board is CST820.
So can you please embbed drivers to openHASP so I can implement full functionality.
Drivers used in Arduino IDE is linked https://www.dropbox.com/scl/fi/2ao4ynpe7dmqujiqied3n/Factory_samples_Capacitive_touch.rar?rlkey=fy6zt8a4f94in3key7ta5hmn1&dl=0
Beta Was this translation helpful? Give feedback.
All reactions