Touch detection on ESP32

Whereabouts in the code do you read the values from the touch sensors and where do you test the values against the threshold value ?