 void servo_ctrl(char cmd[5]){
   if(cmd=="open"){
     if(!isopen){
+      digitalWrite(servo_power, LOW);
       // servo go to 90 degrees (open)
-      servo1.write(pos_open);
+      for (int i=pos_close; i <= pos_open; i++){
+        servo1.write(i);
+        delay(25);
+      }
       isopen=true;
       Serial.println(F("Servo Control write 130"));
-      delay(500);
     } else {
       // do nothing
     }
   } else {
     if(isopen){
+      digitalWrite(servo_power, LOW);
       // servo go to 0 degrees (close)
       servo1.write(pos_close);
+      for (int i=pos_open; i >= pos_close; i--){
+        servo1.write(i);
+        delay(10);
+      }
       isopen=false;
       Serial.println(F("Servo Control write 15"));
-      delay(500);
     } else {
       // do nothing
     }
   }
   // close by setup
   if(cmd=="start"){
-    servo1.write(pos_close);
+    digitalWrite(servo_power, LOW);
+    servo1.write(pos_close);    
     isopen=false;
     Serial.println(F("Servo Control write 15"));
     delay(500);
   }
+  digitalWrite(servo_power, HIGH);
 }
 
 void connect_wifi(String cmd, int t){

  Serial.println(F("connect to server"));

  Serial1.print("AT+CIPSTART=\"TCP\",");
  Serial1.print("\"10.20.50.74\"");
  Serial1.print(",");
  Serial1.println(9600);
  if(Serial1.find("OK")){
    Serial.println(F("TCP connection ready"));
  }
  delay(1000);

  String postRequest = "POST "+URI+" HTTP/1.0\r\n"+
  "HOST:"+SERVER+"\r\n"+

  }

  if(!WIFI_CONN){
    Serial.println(F("check wifi conn"));
    chk_wifi_conn();
  }

