[RESOLVED] ESP32-S3-Touch-LCD-1.28 and esp-idf/tree/master/examples/peripherals/lcd/spi_lcd_touch
Posted: Tue Apr 30, 2024 7:03 pm
Hello,
I am trying to build the "peripherals/lcd/spi_lcd_touch" example for the https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-1.28 board.
I was able to run this example https://github.com/espressif/esp-idf/tr ... _lcd_touch successfully but I cannot figure out how to enable the touch feature.
This is the controller for the board I used https://github.com/espressif/esp-bsp/tr ... ch_cst816s
After following these instructions I can detect the touch but X and Y coordinates are always 0.
Then I figured this is a I2C protocol which is not configured at all as in this example:
https://github.com/MohammedBENHADINE/cst816d_test
Unfortunately this one also does not work and it is complaining the i2c driver is too old. Also this code freezes often once I touch the screen.
I changed it to the newer version following this example to configure I2C Bus master and device
https://github.com/espressif/esp-idf/tr ... d/i2c_oled
Here is the final version so far: https://github.com/oshmykov-dev/esp-idf ... _lcd_touch
Steps to build:
Observe the animation is working fine and the touch is detected but it is always returning "touch pressed = 0 , x = 0 , y=16329" in the logs. The numbers do not ever change.
If you have any general thoughts like what components or steps are required to configure this board correctly or a working code please share. Thank you very much for any help.
https://files.waveshare.com/wiki/ESP32- ... 28-Sch.pdf
https://www.buydisplay.com/download/ic/GC9A01A.pdf
https://www.buydisplay.com/download/ic/ ... S_V1.3.pdf
I am trying to build the "peripherals/lcd/spi_lcd_touch" example for the https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-1.28 board.
I was able to run this example https://github.com/espressif/esp-idf/tr ... _lcd_touch successfully but I cannot figure out how to enable the touch feature.
This is the controller for the board I used https://github.com/espressif/esp-bsp/tr ... ch_cst816s
After following these instructions I can detect the touch but X and Y coordinates are always 0.
Then I figured this is a I2C protocol which is not configured at all as in this example:
https://github.com/MohammedBENHADINE/cst816d_test
Unfortunately this one also does not work and it is complaining the i2c driver is too old. Also this code freezes often once I touch the screen.
I changed it to the newer version following this example to configure I2C Bus master and device
https://github.com/espressif/esp-idf/tr ... d/i2c_oled
Here is the final version so far: https://github.com/oshmykov-dev/esp-idf ... _lcd_touch
Steps to build:
Code: Select all
1. cd %userprofile%\esp
2. xcopy /e /i %userprofile%\git\esp-idf\examples\peripherals\lcd\spi_lcd_touch spi_lcd_touch
3. cd %userprofile%\esp\spi_lcd_touch
4. idf.py set-target esp32s3
5. idf.py menuconfig
6. Example Configuration ---> LCD controller model set to (GC9A01)
6.1. [ ] Enable LCD Touch
6.1.1. LCD touch controller model ---> Choose (CST816S)
7. Save and Quit
8. idf.py add-dependency esp_lcd_touch_cst816s==1.0.3
9. idf.py build
10. idf.py -p <PORT> flash monitor
If you have any general thoughts like what components or steps are required to configure this board correctly or a working code please share. Thank you very much for any help.
https://files.waveshare.com/wiki/ESP32- ... 28-Sch.pdf
https://www.buydisplay.com/download/ic/GC9A01A.pdf
https://www.buydisplay.com/download/ic/ ... S_V1.3.pdf