   //set the data rate of gprs
   //GPRS.println("AT+IPR=9600");
   if(!sim808_check_with_cmd("AT+IPR=9600\r\n","OK\r\n",CMD)){  
-    Serial.println("AT+IPR=9600 => FAIL");    
-  }else Serial.println("AT+IPR=9600 => OK");
+    delay(1);
+    //Serial.println("AT+IPR=9600 => FAIL");    
+  }else {
+    delay(1);
+    //Serial.println("AT+IPR=9600 => OK");
+  }
   delay(50);
   
   //Set the APN id to connect to gprs network
   //GPRS.println("AT+CSTT=\"UNINET\"");
-  if(!sim808_check_with_cmd("AT+CSTT=\"UNINET\"\r\n","OK\r\n",CMD)){  
-    Serial.println("AT+IPR => FAIL");    
-  }else Serial.println("AT+IPR => OK");
+  if(!sim808_check_with_cmd("AT+CSTT=\"UNINET\"\r\n","OK\r\n",CMD)){ 
+    delay(1); 
+    //Serial.println("AT+IPR => FAIL");    
+  }else{ 
+    delay(1);
+    //Serial.println("AT+IPR => OK");
+  }
   delay(50);
     
   //bring up the wireless connection
   //GPRS.println("AT+CIICR");
   if(!sim808_check_with_cmd("AT+CIICR\r\n","OK\r\n",CMD)){  
+    delay(1);
     Serial.println("AT+CIICR => FAIL");    
-  }else Serial.println("AT+CIICR => OK");
+  }else{ 
+    delay(1);
+    //Serial.println("AT+CIICR => OK");
+  }
   delay(50);
     
   //get the local ip number

  strcat(data2db,",");
  strcat(data2db,Speed);

  Serial.println("valor de data2db: ");
  Serial.println(data2db);
  
  
  
  if(!SendDataCIPSEND(data2db,sizeof(data2db))){
    Serial.println("CIPSEND => FAIL");
    //Try to resend    
    /*if(!sim808_check_with_cmd("AT+CIPSTART=\"TCP\",\"ardugps.hopto.org\",6789\r\n","OK\r\n",CMD)){  
      Serial.println("AT+CIPSTART => FAIL");    

  delay(50);
   

/*  posBuf=0;
  i=0;
  //for(int i=0;i<7;i++){
  while((posBuf<=99)&&(i<15)){ 
