 #define LOGO16_GLCD_WIDTH  16 
 */
 
-void servo_ctrl(char cmd){
-  if(cmd=='open'){
+void servo_ctrl(char cmd[5]){
+  if(cmd=="open"){
     if(!isopen){
       // servo go to 90 degrees (open)
-      servo1.write(90);
+      servo1.write(130);
       isopen=true;
+      Serial.println(F("Servo Control write 130"));
       delay(1000);
     } else {
       // do nothing

//unsigned long stime = 1800000; // Zeit zwischen den Sendezeiten
//unsigned long mtime = 900000; // Zeit zwischen den Messungen
unsigned long stime = 20000; // Zeit zwischen den Sendezeiten
unsigned long mtime = 5000; // Zeit zwischen den Messungen

boolean isopen; // Boolean Feld fuer den Status vom Luefter.


    break;
    delay(1000);
  }
  if(IP==""){
    // test 
  } else {
    WIFI_CONN=true;
    NO_IP=true;
    Serial.print(IP);
    Serial.print(F("Port:"));
    Serial.println(80);
  }
}

void wifi_init(){
  connect_wifi(F("AT"),100);
  connect_wifi(F("AT+CWMODE=1"),100);
  connect_wifi(F("AT+CWQAP"),100);
  connect_wifi(F("AT+RST"),10000);
  check_ip(5000);
  if(!NO_IP){
    Serial.println(F("Connecting Wifi..."));
    connect_wifi("AT+CWJAP=\"tlapse\",\"Timelapse-2016\"",7000); //username,password,waittime
  } else {
    // do nothing
  }
  Serial.println(F("Wifi Connect"));
  //get_ip();
  connect_wifi(F("AT+CIPMUX=0"),100);
  check_ip(5000);
  //connect_wifi(F("AT+CIPSERVER=1,80"),100);
}

