Can anyone give me some help in understanding how the Arduino CapSense library is able to sense proximity? From reading the source code, it seems that it toggles a sending pin and then waits for the receiving pin to change to the same state. The time taken (if I understand this correctly) depends on the proximty of a finger, for example, to the sensor electrode. However, there are several things I don't understand, such as:
Why does the proximity of e.g. a human hand change the time taken for the receive pin to change state?
Why is a resistor needed? I can understand a small resistor, but the example seems to recommend a very large (10 Mohm or greater) resistor for better sensitivity.
The site recommends capacitors for better performance. How do these enhance performance?
Does the frequency with which the send pin toggles play into the detectors performance at all?
And finally: Why does it use a digital pin as the receiver? Why not just pipe the output of the whole thing into an analog pin and measure the voltage via ADC?