cancel
Showing results for 
Search instead for 
Did you mean: 

TCS with wire

mihaheh
Associate

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.

2 REPLIES 2
tjaekel
Lead

Ask ChatGPT for help (not us)

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