- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have implemented the CapSense CE210311 successful respectively I can touch a button and see the result with CapSense Tuner.
Now I need to read the DiffCounts like showed in Tuner see attached Picture and finally depending on the number of Counts I want switch on or off a LED.
But now I have really difficult to find the functions which gives me the DiffCounts?
thank you very much
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes, project.h is already included,
as I use CapSense with ADC, I think I should change as follow:
counts = CapSense_ADC_BUTTON0_SNS0_DIFF_VALUE; //
Edit: just tried out => that works :-), thank you very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What I know so far is that there is no specific API to access the diff-count for each buttons.
But you can get the diff-count by directly accessing the each variables.
For example, the diff-count of button0[0] is saved in CapSense_dsRam.snsList.button0[0u].diff variable and you can read it directly. Or there is a definition of CapSense_BUTTON0_SNS0_DIFF_VALUE for pointing out the same variable.
If I found the better way, I will let you know.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can also access as follows:
const CapSense_FLASH_STRUCT *ptrSnsFlash;
ptrSnsFlash = &CapSense_dsFlash;
uint32 widgetId = 0 ;
uint32 sensorId = 0 ;
uint32 diff;
for(widgetId = 0; widgetId < CapSense_TOTAL_WIDGETS; widgetId++)
{
for(sensorId = 0; sensorId < ptrSnsFlash->wdgtArray[widgetId].totalNumSns; sensorId++)
{
diff = ptrSnsFlash->wdgtArray[widgetId].ptr2SnsRam->raw[sensorId];
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The definition 'CapSense_BUTTON0_SNS0_DIFF_VALUE' is defined in 'CapSense_RegisterMap.h' and CapSense_dsRam is in 'CapSense_Structure.h' and 'CapSense_Structure.c'.
To use that, you may include 'project.h'.
Please try to include that header file.
#include "project.h"
Thank you.
Allen Kim.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes, project.h is already included,
as I use CapSense with ADC, I think I should change as follow:
counts = CapSense_ADC_BUTTON0_SNS0_DIFF_VALUE; //
Edit: just tried out => that works :-), thank you very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please upload your project. I will try with your project.
Thank you.
Allen Kim.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
see above, it works now 🙂 - thank you for your support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great!!!