 int servo_pin = 5;
 // Create a servo object 
 Servo servo1;
+int pos = 0;
 
 //DHT lib
 int dhtPin = 4;

    break;
    delay(1000);
  }
  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"),5000);
  check_ip(5000);
  if(!NO_IP){
    Serial.println(F("Connecting Wifi..."));
    connect_wifi("AT+CWJAP=\"tlapse\",\"Timelapse-2016\"",7000); //username,password,waittime
  } else {
  }
  Serial.println(F("Wifi Connect"));
  //get_ip();
  connect_wifi(F("AT+CIPMUX=0"),100);
  //connect_wifi(F("AT+CIPSERVER=1,80"),100);
}


      while(wifi.available()>0){
        if(wifi.find("WIFI GOT IP")){
          NO_IP=true;
          WIFI_CONN=true;
        }
      }
  }
