It is possible to use both CapSense button and proximity sensor at the same time.
I have attached a project that demonstrates the same. This might work in your case as well. Please try it out and let us know if it works.
I am getting an error message stating that it cannot find V6 of the capsense component. I swapped it with a V5 capsense and update the project but it still did not work properly. One LED turns on and off, but the other stays on despite interfacing with the sensor. This is the same thing that happens on my project.
I attached some JPGs of my project for reference.
Some Background info:
- I started my project in PSOC creator 3.2
- I moded the sample example "Project Name : CapSense_Proximity_Design" - the project is all good until that point
- Had to update the project to add a button, so I ended up downloading PSOC creator 4.2 and updated the project "Top design" as thing where showing out of date. Then updated the code.
I am hoping that by looking a the JPGs you will be able to spot what I am doing wrong.
In the code, the code for initializing sensor baseline and updating sensor baseline for CapSense button component are missing. Also at the end of the if(CapSense_IsBusy()== NOT_BUSY) condition, the code for scanning widgets must be added instead of scanning only the proximity sensor by replacing the CapSense_ScanSensor(PROXIMITY_SENSOR_INDEX); line with CapSense_ScanEnabledWidgets();.
I've added a project with all these changes. Please have a look as it might work in your case as well.
It is, however recommended to use the new CapSense component for new designs as it has new features and enhanced performance. A detailed migration guide can be found on page 152 of the PSoC 4 Capacitive sensing document, link: https://www.cypress.com/file/442046/download
Hope that it solves the problem. If any issue arises, please attach the archive of your project along with the problem so that we can debug and provide a solution. Details for archiving a project can be found in this link: https://community.cypress.com/docs/DOC-9742
Thank you for the feedback, both sensors are working now. For future project I will definitely be using the updated component. Thanks again for the support on this!