I am currently working on a wireless gardening project and quite new to this field.
My sht10 sensor is connected to Arduino Uno and GSM AT commands is used for wireless communication. I am using HTTP Get method to display sensor data on my web service.
The sensor value is stored using &temperature and &humidity.
soilSensor.measure(&temperature, &humidity, &dewpoint);// sensor value
To display sensor value on web service, I converted the value into string.
String stringOne = String(temperature)
String stringTwo = String(humidity)
But I am not able to display sensor data on web service using standard HTTP Get method because of '&' (pass by reference). I am getting T = 0.00 and H = 0.00
gprsSerial.println("AT+HTTPPARA=\"URL\",\"http://xyz.com/api.aspx?Device=sensor&DeviceData=T= " +stringOne+ " ,H= " +stringTwo+ " \"");
If I upload a code without '&' for storing the values, I get the data displayed properly.
So, what is wrong with my syntax for converting variable with values passed by reference and the is any difference in which they must be sent to the web service through HTTP Get ? ?
=
inDeviceData=T=
! Btw, this is the wrong site to ask this question.