     console.println("*     D13 = OFF     *");
    }   
   }  
-  messageReceived="";
-  }
-}
-
-void buttonPressed()
-{
-  DT06.write("AT+TCPCLIENT");  
+  messageReceived=""; // Flush buffer
+  }
+  delay(1);
 }
 
 void checkStatus()

{
 while(DT06.available()) 
 {
  delay(3);
  char c = DT06.read();
  messageReceived+= c;
 }
 if (messageReceived.length() >0) 
 {  
  //console.println(messageReceived);
  /*****************************************************/

  boolean TCP_OK = false;
  console.println("INIT...");
  console.println("---------------------"); 
  DT06.print("AT+TCPCLIENT");
  delay(100);
  while(DT06.available()) 
   {
    messageReceived = DT06.readString();  
   } 
  console.println(messageReceived); 

