 #include <SoftwareSerial.h>
 
 SoftwareSerial softSerial(2, 3); // RX, TX
-String WSSID = "LEE JEONG HYU";
-String WPASS = "9220230s*";
+String WSSID = "raspie";
+String WPASS = "11111111";
+String res = "";
 bool r;
 int relay1 = 4;
 int relay2 = 5;

}

void loop() {
  digitalWrite(relay2, HIGH);
  digitalWrite(relay1, HIGH);
  r = espSendCommand( "AT+CIPSTART=\"TCP\",\"wy.iptime.org\",8099" , "OK" , 5000 );
  String getRequest = "GET /Test/Test HTTP/1.0\r\n";
  int getRequestLength = getRequest.length() + 2;
  r = espSendCommand( "AT+CIPSEND=" + String(getRequestLength) , "OK" , 5000 );
  if(espSendCommand( getRequest , "ON" , 20000 )){
     Serial.println("WTF");
     digitalWrite(relay1, HIGH); // 릴레이를 작동
    
     delay(1000); // 2초 대기
     digitalWrite(relay1, LOW); // 없을 경우 릴레이를 끔
     
  }else {
     digitalWrite(relay2, HIGH); // 릴레이를 작동
     delay(1000); // 2초 대기
     digitalWrite(relay2, LOW); // 없을 경우 릴레이를 끔 
  }
  if ( !r ) {
    Serial.println( "Something wrong...Attempting reset...");

      if ( response.length() > 0 ) {
        Serial.println("espSendCommand: RESPONSE:");
        Serial.println( response );
        res = response;
      } else {
        Serial.println("espSendCommand: NO RESPONSE");
      }
