Capacitive touch on ESP32-3248S035C

Recurrent H/W and software problems
botman
Posts: 91
Joined: Thu Apr 01, 2021 3:04 pm
Has thanked: 10 times
Been thanked: 39 times

Capacitive touch on ESP32-3248S035C

Post by botman »

I tried to use the capacitive touch option in Annex32 on an ESP32-3248S035C CYD relative TFT display board.
I installed Annex32 CAN 1.52.1 LFS and set the custom pin configurations to make the TFT display work properly.
I left the Touch pin configuration at -1.
In the editor, I pasted a copy of your example code to use the capacitive touch screen.
I changed the pin numbers in the I2C.SETUP command to 33 for the SDA and 32 for the SCL.
When I ran the program, I got a syntax error on the OPTION.TOUCH 1 command.
I tried doing an I2C scan, and a device was found at 0x5D which seems right for the GT911 touch controller.
Attached is a image from the schematic showing the connections on the board for the display.
Touch connections.jpg

At first, I didn't do anything with pin 25, but making it an output and setting it to 1 or 0 didn't help.
R25 zero Ohm resistor for the interrupt line is not populated on the board.
The demonstration software that initially was on the board seemed to use the touch screen properly.
Would you have any suggestions to make the capacitive touch screen work with Annex32 on this board?
You do not have the required permissions to view the files attached to this post.
User avatar
cicciocb
Site Admin
Posts: 2195
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: Capacitive touch on ESP32-3248S035C

Post by cicciocb »

If I remember well the capacitive touch is enabled only for the ESP32-S3 with LCD RGB 4" (480x480) and 7" (800x480).

The supported models should be ESP32-8048S070C and ESP32-4848S040

Edit:
I could include the support for this module in the options but at the condition that you confirm that it works for you
botman
Posts: 91
Joined: Thu Apr 01, 2021 3:04 pm
Has thanked: 10 times
Been thanked: 39 times

Re: Capacitive touch on ESP32-3248S035C

Post by botman »

If you include this board as an option, I would be glad to test and report to you how it works.
User avatar
cicciocb
Site Admin
Posts: 2195
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: Capacitive touch on ESP32-3248S035C

Post by cicciocb »

OK
User avatar
cicciocb
Site Admin
Posts: 2195
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: Capacitive touch on ESP32-3248S035C

Post by cicciocb »

Hi,
I uploaded the version 1.52.2 that contains the support for the modules ESP32-3248S035R and ESP32-3248S035C.

Let me know if this works for you.

p.s.

When the module ESP32-3248S035C is selected, the touch is automatically configured as capacitive ( OPTION.TOUCH 1 is not required)
botman
Posts: 91
Joined: Thu Apr 01, 2021 3:04 pm
Has thanked: 10 times
Been thanked: 39 times

Re: Capacitive touch on ESP32-3248S035C

Post by botman »

Thank you for your work on configuring Annex32 for the 3.5 inch CYD-relative display boards.

I first flashed version 1.52.2 on a new ESP32-3248S035R module.
I selected the configuration for that module and for the correct TFT screen and enabled the SD card.
I calibrated the resistive touch screen.
The screen display and the SD card and the resistive touch all seemed to work properly.
I had a TOUCH.READ command in the code targeted by the ONTOUCH command and it caused a syntax error.
Commenting out or deleting the TOUCH.READ command made the code seem to work properly.
Version 1.48.22 of Annex would not read the touch screen properly without the TOUCH.READ command.
In a couple of my programs, I have used the TOUCH.READ command as a way of polling the screen to see if touch.z
would sense that the screen was being touched. Those programs would not work the same with this version of Annex32.

I flashed version 1.52.2 on a ESP32-3248S035C module.
I selected configuration for that module and for the correct TFT screen and enabled the SD card.
The screen display and the SD card seemed to work properly.
I wasn't sure if I should use TOUCH.CALIB on the capacitive screen, so I did not try that. Should I have done that?
I couldn't get the capacitive touch to work with or without the TOUCH.READ command.
I did not use the TOUCH,OPTION 1 command. I tried using the TOUCH.INIT command and even
tried adding I2C.SETUP 33, 32 but it didn't help.
User avatar
cicciocb
Site Admin
Posts: 2195
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: Capacitive touch on ESP32-3248S035C

Post by cicciocb »

Thanks for your feedback.

Following your information, I uploaded a new version 1.52.3 that should fix the snags on both resistive and capacitive.

Please try and let me know.

p.s.

The capacitive touch do not require the calibration
botman
Posts: 91
Joined: Thu Apr 01, 2021 3:04 pm
Has thanked: 10 times
Been thanked: 39 times

Re: Capacitive touch on ESP32-3248S035C

Post by botman »

I flashed version 1.52.3 onto an ESP32-3248S035C and configured board type, the TFT type, landscape, and SD card on.
The TFT, SD card, and the touch screen work!
It works without the touch.init and without the I2C.setup and with the touch.read commands.
In landscape mode, the printing and the colors on the TFT match those of the resistive screen.
The x=0 and y=0 are in the lower left corner, not the upper left like the resistive.
Also the x dimension represents distance upward from the bottom of the screen,
and the y dimension represent distance rightward from the left edge.
The resistive had the x dimension represent rightward from the left edge of the screen.
and the y dimension represent downward from the top of the screen.

I didn't flash 1.52.3 on the ESP32-3248S035R. I'll do that next.
Last edited by botman on Tue Mar 12, 2024 11:10 am, edited 1 time in total.
botman
Posts: 91
Joined: Thu Apr 01, 2021 3:04 pm
Has thanked: 10 times
Been thanked: 39 times

Re: Capacitive touch on ESP32-3248S035C

Post by botman »

I flashed 1.52.3 on the ESP32-3248S035R board and everything works
including the touch.read command! Thank you again.
The origin and axes directions are as I described above for the resistive screen
(after the screen was calibrated).

Could the capacitive screen origin and axes directions be made to match the resistive
just for consistency from one to the other?
User avatar
cicciocb
Site Admin
Posts: 2195
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: Capacitive touch on ESP32-3248S035C

Post by cicciocb »

Ok, I'll fix the orientation for the capacitive
Post Reply