I am trying to detect proximity using the CapacitiveSensor Library GitHub - PaulStoffregen/CapacitiveSensor: Detect touch or proximity by capacitve sensing
I have tried to use this lib with an Arduino UNO for proximity detection by adding a 1 Mohm resistor between the send and the receive pins.
I have tried the same with the ESP8266 WiFi module and putting the residtor between GPIO 4 and GPIO 5. However, it only detects when I touch the PIN no proximity is detected. Adding to that, on the serial monitor it outputs the timeout error -2 if it is not touched.
Please advise if there is anyway we can workarround this to detect the proximity on the ESP8266 module.