proximity sensors

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

cross mob
Anonymous
Not applicable

hello,

   

 I wanted to know if it is possible to use PSoC5LP the  proximity sensing with the CY8CKIT-059.

   

Thanks.

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum, Florian!

   

Yes, you may use CapSense and proximity sensors with the -059 kit. The needed capacitor CMOD is already on the board, so you just need a wire connected to the pin of your choice.

   

 

   

Bob

View solution in original post

0 Likes
9 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum, Florian!

   

Yes, you may use CapSense and proximity sensors with the -059 kit. The needed capacitor CMOD is already on the board, so you just need a wire connected to the pin of your choice.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thank you Bob,

   

I tried to do the same thing as in this video: https://www.youtube.com/watch?v=BMslzJHodyg&ab_channel=FutureElectronics. But I did not find  the location of the bootloader. So please do you have an answer for his location? Or a solution for use the proximity sensors .
Thanks

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Your -059 kit has got a kitprog which you use as programmer and debugger. You do not need a bootloader or bootloadable component.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

So if i do the exact same thing as in this video but without the part with the bootloader it should work?

   

Thanks.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Yes, you can! Care fot the LED-pin which is Port2 pin 1 for the -059 kit <8different from your -49 example)

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thank you,

   

So I wrote this :

   

#include <project.h>

   

int main()
{
    CyGlobalIntEnable;
    CapSense_1_Start();
    CapSense_1_InitializeAllBaselines();
   
    CapSense_1_EnableWidget(CapSense_1_PROXIMITYSENSOR0__PROX);
    for(;;) 
    {
        CapSense_1_ScanEnabledWidgets();
        if(! CapSense_1_IsBusy() )
        {
        LED_Write( CapSense_1_CheckIsWidgetActive( CapSense_1_PROXIMITYSENSOR0__PROX ) );
        }
        CapSense_1_UpdateEnabledBaselines();
    }
}

   

but when i put the wire for the proximity sensors the LED is on and she is on all the time excpet when there is no wire. So what is the problem?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You repeat ScanEnabledWidgets() over and over and do not wait until it is done. Do not use an "if", instead wait until not busy.

   

I frequently use

   

#define Wait(x)     //  Just for the readability

   

...

   

while(CapSense_1_IsBusy() ) Wait();

   

...

   

 

   

Bob

0 Likes
Anonymous
Not applicable

It works, thank you!! 

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Great! But seemingly took you a long time to evaluate. Holydays???

   

 

   

Bob

0 Likes