What is touch_pad_get_status() supposed to return?
Posted: Mon Feb 08, 2021 11:20 pm
Hi.
My first post was either deleted or didn't submit, idk.
What I want to do:
I have 7 touch buttons on my board and want to attach interrupts to everyone, calling the same function.
In this function I would like to use touch_pad_get_status() or other to get which button was touched. Then a switch case would do the rest.
What I'm facing:
This code
always returns 0, no matter what.
What I've tried:
Including this part of code to the setup
Thanks in advance.
My first post was either deleted or didn't submit, idk.
What I want to do:
I have 7 touch buttons on my board and want to attach interrupts to everyone, calling the same function.
In this function I would like to use touch_pad_get_status() or other to get which button was touched. Then a switch case would do the rest.
What I'm facing:
This code
Code: Select all
Serial.print("Button ");
uint32_t touch = touch_pad_get_status();
Serial.println(String(touch));
What I've tried:
Including this part of code to the setup
Code: Select all
touch_pad_init();
touch_pad_set_fsm_mode(TOUCH_FSM_MODE_TIMER);