How to display the finger position by CapSense_GetCentroidPos API function on dev-board CY8CKIT-149.

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

cross mob
wangyuanfan
Level 3
Level 3
10 replies posted 10 questions asked 10 sign-ins

I want to display finger position on the LinerSlider with a value between 0 and 100.

I'm using UART and TeraTerm to display the value.

Here's the main reference video (URL: https://www.youtube.com/watch?v=fsxwYpacrCA&list=PLIOkqhZiy83F8KPvHejA4ujvAfwJYpAtP&index=13).

I think it's because this video is old, but some functions are not provide such as

CapSense_ScanEnableWidgets()

, and the ID of the LinerSlider is different.

I have specified ID "CapSense_LINEARSLIDER0_WDGT_ID" instead of  ID "CapSense_LINEARSLIDER0__LS".

(CapSense_P4_v7_0.pdf Page67 said to do so here, so I did).

UART connection is OK, but It doesn't display the value of finger position.

Please look at my project I shared and tell me what is wrong with it.

0 Likes
1 Solution
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @wangyuanfan,

CapSense_Start() function call is necessary to initialise the CapSense modules. This function call also scans the widgets, initialises the firmware filters and updates the baseline. Always use CapSense_Start() function call at the start of the application.

After scanning the widgets, the data needs to be processed. Use CapSense_ProcessAllWidgets() function for the same. The baselines get updated too.

Find the project archive attached.

 

Regards,
Nikhil

View solution in original post

0 Likes
2 Replies
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins

Hi @wangyuanfan,

CapSense_Start() function call is necessary to initialise the CapSense modules. This function call also scans the widgets, initialises the firmware filters and updates the baseline. Always use CapSense_Start() function call at the start of the application.

After scanning the widgets, the data needs to be processed. Use CapSense_ProcessAllWidgets() function for the same. The baselines get updated too.

Find the project archive attached.

 

Regards,
Nikhil

0 Likes

It worked correctly! Thank you so much!!

0 Likes