How to remove it, substitution V

Good afternoon, tell me where this letter comes from, and how to get rid of it, thanks

#include <SPI.h>
#include <Ethernet.h> 
boolean recievedFlag;
String strData, Link;
const char server = "test.com";                           
const int httpPort = 80;                                    
EthernetClient client;


void setup() {
   delay(1000);
   Serial.begin(9600);
   while (!Serial) {
    ; 
  }
   Serial.print("Connecting");
   Serial.print(server);
   Serial.print("."); 
}


void loop() {
  while (Serial.available() > 0)                             
  { strData +=(char)Serial.read();                           
   recievedFlag = true; delay(2); };                         
  if (recievedFlag)                                          
  { Serial.println(strData);                                
    transmit();                                              
    strData ="";                                             
    recievedFlag = false;}                                   
}
void transmit() {
 EthernetClient Client;                                     
 Serial.println(server);                                                      
 Client.setTimeout(15000);                                  
 delay(1000);                                                                                    
 Serial.print("HTTP Connecting");                           
 int r=0;                                                   
 while((!Client.connect(server, httpPort)) && (r < 1))
 {delay(100);Serial.print(".");r++;}                         
 if(r==30) {Serial.println("Connection failed");}              
 else {Serial.println("Connected to Ok");}                     
 Link = "test.com/get.php?id=";                            
 Serial.print("requesting URL: ");                           
 Serial.println(server+Link+strData);                        
 Client.print(String("GET")+Link+"HTTP/1.1\r\n" +             
 "Host: "+server+"\r\n" + 
 "Connection: close\r\n\r\n");                                
 Serial.println("request sent");                              
 while (Client.connected())                                   
 {String line = Client.readStringUntil('\n');
 if (line == "\r") {Serial.println("headers received");break;}}
 Serial.println("reply was:");                                
 Serial.println("==========");                                
 String line;                                                 
 while(Client.available()){                                    
 line = Client.readStringUntil('\n');                    
 Serial.println(line);}                                       
 Serial.println("==========");                                
 Serial.println("closing connection");}

com

how to remove it V

this should be a char array, and probably the source of you issue IMHO, ie

const char server[] = "test.com";  

hope that helps...

Oh my God. Thanks a lot ))))))

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.