i want to send some data to my web page using GET METHOD. I am using a gsm shield to accomplish that and in a way it works, but only if i put the url with the values prefixed in the arduino code myself.
this is the code i am currently using to send the data in my db
It's a common mistake. You DON'T need to concatenate it first and then send it out. You can just send it out in the order you want. This will save you time and a lot of memory.
mySerial.print(F("AT+HTTPPARA=\"URL\",\"http://arduinowateringsystem.com/sensor_values.php?dat="));
mySerial.print(3);
mySerial.print(F("&temp="));
mySerial.print(10);
mySerial.print(F("&hum="));
mySerial.print(20
mySerial.print(F("&soil="));
mySerial.print(30);
mySerial.println(F("&last=NOW()\""));
[/quote]
Also added the F macro :)
Unless you are sending the data to a server, using client.print(). In that case, every print() sends a packet. Sending fewer packets is faster than sending lots of packets.
There is NO need to use Strings for this. sprintf(), dtostrf() and char arrays were invented for a reason.
But I don't think it does. Except from a bit more time between the parts there is no way for the device to see the difference between a single print and multiple prints. Most devices are simply triggered by the new line, which is only send after the last bit.