Skip to main content
Associate
Feb 21, 2024 8:53 PM UTC
Question

TCS with wire

I am starting a project in which I need touch sensors. With the help on chat gpt I have come up with this code. 

while (1)

{

key = HAL_TSC_GroupGetValue(&htsc, TSC_GROUP1_IO2);

printf("%d\n",key);

/* USER CODE END WHILE */

/* USER CODE BEGIN 3 */

}

I have sampling on group 1, I01 and the sensing on group 1 IO2. I have connected the sampling IO1 to GND pin and the IO2 I have left in the air for me to touch (wire). The problem is that whatever I do, I get printed out value of 0. Thank you for your help.

This topic has been closed for replies.

2 replies

Lead II
Feb 22, 2024 6:08 AM UTC

Ask ChatGPT for help (not us)

mihahehAuthor
Associate
Feb 22, 2024 4:09 PM UTC

Thank you for helping me, so mature of you. Like I didn't try that already.