Following is an example project for implementing a simple , PSoC 4 Based Proximity Detection. A documentation explaining the same has also been attached.
Attaching the Project...
Also, note that in CY8CKIT-042, we have a 2.2 nF Cap connected to P4_2. This will be used as the Cmod. That is why, we have routed Cmod to P4_2 in the .cydwr file.
There was a small typo in the documentation. The "for states" should be "four states". Attached is the updated documentation.