How to stop servo from pulsating?

Would you mind to help me modify my code with detaCH ADDED?

hERE IS MY CODE:

//Create servo object to control a servo
Servo myServo;
int posCurrent;

void setup() 
{
    //Attaches the servo on pin D0 to the servo object 
    myServo.attach(D0);
    posCurrent = 0;
    
    //Register our Particle to control the servo
    Particle.function("openBlinds", openBlinds);
    Particle.function("closeBlinds", closeBlinds);
}

void loop()
{ 
}

int openBlinds(String command)
{
     int newPos = command.toInt();
   // Make sure it is in the right range
   // And set the position
   posCurrent = constrain( newPos, 0 , 90);

   // Set the servo
   myServo.write( posCurrent );

   // done
   return 1;
}

int closeBlinds(String command)
{
     int newPos = command.toInt();
   // Make sure it is in the right range
   // And set the position
   posCurrent = constrain( newPos, 90 , 0);

   // Set the servo
   myServo.write( posCurrent );

   // done
   return 1;
}