2 of 2 people found this helpful
You can use the CapSense_GetParam to read the raw counts from CapSense widget. The first parameter is the paramID present in CapSense_RegisterMap.h and the second parameter is the address of the variable where value needs to be stored.
I'm attaching a simple project to show this for CapSense buttons with this response.
Do try this out.
1 of 1 people found this helpful
I think you can read these values through the dsRam.
Please see the Data Structure Description in the PSoC 6 Capacitive Sensing Component datasheet.
(Also see "To access CapSense Data Structure registers you have the following options:")
You can try to get the register map on your design as below.
Right clock on CapSense Component on your TopDesign.cysch window, and click "Save Register Map as PDF".
And search "RAW" on this PDF.
For example, the LED trun on, when the button is touched and the raw counts is grater than some value.
testval = CapSense_dsRam.snsList.btn0[0u].raw[0u];
if(testval > 2000) LED_13_Write(LED_ON);
(You can use also CapSense_GetParam() function.)
Sorry, now I have only PSoC 4 board. (PSoC 6 is in my office.)
So, I cannot give you complete example code.
I think the below thread also helpful.