problem with row in capsense matrix

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
haou_4787611
Level 1
Level 1

i'm playing with the capsense function of PSOC 4 pioneer kit. i'm using the matrix widget to control the LED.

the collumns work fine but the second i try to use rows nothing happens. i dont know how or why it doesnt work?

i tried CapSense_CheckIsSensorActive(CapSense_SENSOR_MATRIXBUTTON0_ROW0__MB) but this does nothing

so the question is how do i use the rows of the matrix?

0 Likes
1 Solution
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi ,

Firstly, we recommend you to use CapSense Component v7.0 for newer designs.  We do not recommend CSD component for new designs.

You need to call CapSense_UpdateEnabledBaselines() before checking the status of the sensors using CapSense_CheckIsSensorActive.

If you would like to know the position of touch in a matrix button you can use the API CapSense_GetMatrixButtonPos()

But first you need to know if any sensor in the widget was touched to check for the positon of touch. For that you can use the following snippet:

if(! CapSense_IsBusy())

{

      CapSense_UpdateEnabledBaselines();

      CapSense_CheckIsWidgetActive(CapSense_MATRIXBUTTON0__MB)

      {

          CapSense_GetMatrixButtonPos(CapSense_MATRIXBUTTON0__MB, &position);

      }

     CapSense_ScanEnabledWidgets();

}

    

If this doesn't solve your issue, connect your board to Tuner GUI and check if the rawcounts and difference counts doesn't have any issue.

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
1 Reply
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi ,

Firstly, we recommend you to use CapSense Component v7.0 for newer designs.  We do not recommend CSD component for new designs.

You need to call CapSense_UpdateEnabledBaselines() before checking the status of the sensors using CapSense_CheckIsSensorActive.

If you would like to know the position of touch in a matrix button you can use the API CapSense_GetMatrixButtonPos()

But first you need to know if any sensor in the widget was touched to check for the positon of touch. For that you can use the following snippet:

if(! CapSense_IsBusy())

{

      CapSense_UpdateEnabledBaselines();

      CapSense_CheckIsWidgetActive(CapSense_MATRIXBUTTON0__MB)

      {

          CapSense_GetMatrixButtonPos(CapSense_MATRIXBUTTON0__MB, &position);

      }

     CapSense_ScanEnabledWidgets();

}

    

If this doesn't solve your issue, connect your board to Tuner GUI and check if the rawcounts and difference counts doesn't have any issue.

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes