Capsense on-off button | Cypress Semiconductor
Capsense on-off button
I am using CY8CKIT-001 - CY8CKIT-009. I have a problem.I want to use it as a single on-off capsense button. So when I press the button once will light up led,later I press the same capsense button again will turn off led. I use the following code:
if( statusButton0 == ON && onoff==0)
if( statusButton0 == ON && onoff==1)
I do not know what I'm doing wrong but Led is flashing. Do you have a software error or hardware error? Thanks your answers.