Servo statement


#1

Hi,
I want to display the servo statement on the thinger, if the servo rotates 90 degrees the statement is “Open” than the servo rotates 0 degrees it is written “Closed”. can anyone help me with the code ? thanks…


#2

hi @ID_C you can try with this:

thing["servo_statement"]>>[](pson &out){
  if(angle==0){
     out="OPEN";
  }else if(angel==90){
     out="CLOSE";
  }else{
     out="?";
  }
};


#3

it’s work, thanks…