Getting toch on waveshare ESP32-S3 Development Board, with 1.28inch Round Touch LCD to work

Now for background, squareline studio only supports SPI interface (a single pin) for the touch to work. In the case of the board provided by waveshare, the touch chip used is CST816S which only supports i2c interface (4 pins)

The UI.ino code only checks for touch using different functions not supported by the CST816S touch chip. what you need to do is to simply make the configuration so it registers with that particular touch chip.

Now follow the steps exactly has stated under this link (follow the steps made by [cdchristian] at the top of the page. only change you would make are as follows:

where it says:
“CST816S myTouch(18, 17, 21, 16); //Add this line”

for the board waveshare provides you will add this instead:
“CST816S myTouch(6, 7, 13, 5); //Added this line”

Note that this only resolves the touch issue. You would follow the steps to setup the TFT/LCD (display) as stated by squareline studio. for that part best to use the TFT_espi and LVGL folders generated by squareline studio instead of the one provided by waveshare.

Only change you would have to make then is to the “User_Setup.h” file found in the TFT_espi folder. Copy whats inside the setup file provided by waveshared (TFT_eSPI_Setups > Setup207_GC9A01.h) then paste it inside the User_Setup.h exported from squareline.

Also its important to note that higher versions of LVGL and ESPI has been noticed to cause issues. I am using
LVGL - 8.3.6
TFT_espi - 2.5.43

comment if you have any further questions

2 Likes