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.

CCS/MSP430G2553: Slider programming

Part Number: MSP430G2553

Tool/software: Code Composer Studio

My main objective is to have a slider functionality i.e. touch an LED it lights up and then when I touch the next it lights up too after which when I touch any again it switches off. I am getting that with one of them - one button but it doesnt happen with the two_button. Can you please help me debug the code. Inside while loop I have:

#ifdef ELEMENT_CHARACTERIZATION_MODE
// Get the raw delta counts for element characterization
TI_CAPT_Custom(&one_button,&dCnt1);
// __no_operation(); // Set breakpoint here
TI_CAPT_Custom(&two_button,&dCnt2);
__no_operation(); // Set breakpoint here

#endif

#ifndef ELEMENT_CHARACTERIZATION_MODE

if(TI_CAPT_Button(&one_button)==1||TI_CAPT_Button(&two_button)==1)
{
//p=;
if(n==0&&TI_CAPT_Button(&one_button)==1){
P1OUT+= BIT0; // Turn on LED
n=1;
}
if(n1==0&&TI_CAPT_Button(&two_button)==1){
P1OUT+= BIT1; // Turn on LED
n1=1;
}
}else if(TI_CAPT_Button(&one_button)==0)

{
P1OUT &=BIT0; // Turn off LED
n=0;}

else if(TI_CAPT_Button(&two_button)==0){
P1OUT &=BIT1; // Turn off LED
n1=0;}
}
#endif

**Attention** This is a public forum