This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR2675: FR2675 to detect moisture

Genius 9880 points
Part Number: MSP430FR2675


Hi Team,

Good day, we received query from customer and would like to seek for your expertise regarding this. The customer is using FR2675 to detect moisture.

He provided his callback function below.

void capacitive_data_cb(tSensor* pSensor)
{
tElement** ppEle = (*pSensor->pCycle)->pElements;
tElement* pEleK = ppEle[0];
tElement* pEleG = ppEle[1];
gRawCountK = *pEleK->pRawCount;
gRawCountG = *pEleG->pRawCount;
gProxG = pEleG->bProx;
gProxK = pEleK->bProx;
}

The customer want to know how to reset the tElement values after it detects moisture

Thank you and looking forward for your kind response.

Regards,

Maynard

  • Hi,

    1. It is a very interesting application. Can you tell more details that how customer use CapTIvate to detect moisture?

    2. If I understand is right that customer want to set the value go back to LTA. I think they can try     MAP_CAPT_calibrateUI(&g_uiApp);

    Eason

  • Hi Eason,

    Sorry for late reply. I couldn't reply you because of my non-company email. I just changed it into my company's email.

    1.I'm not very familiar about the hardware. currently I just check the value of tElement.bProx to determine if the device detect moisture.

    2. I have already tried " MAP_CAPT_calibrateUI(&g_uiApp);", it didn't work. It would reboot my device.

    Here is my code:

    void capcitive_data_cb(tSensor* pSensor)
    {
    tElement** ppEle = (*pSensor->pCycle)->pElements;
    tElement* pEleK = ppEle[0];
    tElement* pEleG = ppEle[1];
    gRawCountK = *pEleK->pRawCount;
    gRawCountG = *pEleG->pRawCount;
    gProxG = pEleG->bProx;
    gProxK = pEleK->bProx;
    }

    int main()
    {
    MAP_CAPT_registerCallback(&BTN00, &capcitive_data_cb);
    CAPT_appStart();
    for(;;)
    {
    ...
    CAPT_appHandler();
    CAPT_appSleep();
    ...
    if(gProxG||gProxK)
    {
    //do something
    //reset "pEleK->bProx" and "pEleG->bProx"
    }
    }
    ...
    }

    the line in red is what I need

  • Why customer want to reset the Proximity flag?

    Actually For pEleK->bProx" and "pEleG->bProx", it will be updated when calling CAPT_appHandler(). As the device detect there is a proximity signal, it will update the proximity flag. As a result, even you reset the proximity flag, it will still be set when calling CAPT_appHandler() again.

    If customer only need to reset the flag, they can create a new flag by themselves.

  • Because when I touch the panel, the proximity flag will be set to true by library, but after I remove my finger from the panel, the proximity flag is still true. I want it can be set to false.

  • Does it still remain true after you remove your finger far away from the pannel?

    Do you touch it for a long time?

    Can you use the data logging function to record the data and post it on e2e?

**Attention** This is a public forum