iamkristher
iamkristher

Reputation: 408

Client.println in Arduino Ethernet Shield not working properly

we are stuck on this problem where the arduino won't send data to server when i use string concatenation. It works when we used localhost as our server but when we use a real server, it does not work anymore. We need to send the DO value to our server.

// This does not work

String data = "GET /dissolved/insertdata.php?dissolvedoxygen=" + String(disoxx) + "&temperature=" + floatToString(temp,2);

client.println(data);

//This work String data="GET /dissolved/insertdata.php?dissolvedoxygen=6.233&temperature=23.60" ;

client.println(data);

Upvotes: 0

Views: 2206

Answers (1)

jdr5ca
jdr5ca

Reputation: 2819

You need two terminators on the request. Add another \r\n.

everyone forgets these

Upvotes: 1

Related Questions