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.

RTOS: Button State with send command CC1310

Other Parts Discussed in Thread: CC1310, Z-STACK, LAUNCHXL-CC1310

Tool/software: TI-RTOS

Hi everyone, I'm working with the communication between two cc1310 through set commands. I am experiencing a problem with this communication. I would like to turn on the LED from a second device, by pressing the button of the first device. When I press the button, the LED of the second device turns on and off by itself and sometimes not. I saw the PIN of the button with the multimeter and when I press it doesn't go to 0, but it returns to 1 automatically. These are my configuration codes:

mycode.c: 

Button1 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_NEGEDGE,

CC1310DK_7XD.c

BUTTON1 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS,

mycode.c

if (PIN_getInputValue(Button1) == myvar)					
		{
   		  if(myvar==0){
   		    PIN_getInputValue(Button1) == 1;
   	            myvar = PIN_getInputValue(Button1);
   		    strcpy(From_uart,"#011");                          //SEND COMMAND
   	            return;
		} else {
		    PIN_getInputValue(Button1) == 0;
		    myvar = PIN_getInputValue(Button1);
   		    strcpy(From_uart,"#010");
		}
		}