I am working on a project in which I am using NodeMCU-ESP32 DEVKITV1. I am trying to use capacitive touch pins to perform a particular task when the value is below the threshold but without touch, the touch pin produces values that are below the threshold creating the problem. I have gone through the documentation and found that esp 32 does have this problem. To overcome this issue, people suggested using ISR, but I am a newbie and unable to understand the underlying concept. Can someone guide me on this?
Following is the script.
Actually, I have changed the threshold, but irrespective of the threshold, the value gets changed for a fraction of time as mentioned here. This causes the if block to be executed.
I have pasted the complete code. Moreover, I am just using pin 27 and pin 12 of the controller which I touch to execute the if block. Nothing extra is added to the hardware.
I am also facing the same issue.
This is causing a lot of false triggers and making the touch input feature practically useless.
Please tell me a solution if you have found out.