I want to interface GSM module with accelerometer ADXL 345.
My code is the example code from SparkFun ADXL 345 Hook up guide.
void loop(){
String stringOne = String(x);
String stringTwo = String(y);
String stringThree = String(z);
// Accelerometer Readings
int x,y,z;
adxl.readAccel(&x, &y, &z);
Serial.print(x);
Serial.print(", ");
Serial.print(y);
Serial.print(", ");
Serial.println(z);
}
and my GSM AT command for sending data to web service is
gprsSerial.println("AT+HTTPPARA="URL","http://website.in/api.aspx?Device=accelerometer&DeviceData=X=" +stringOne+ ",Y=" +stringTwo+ ",Z=" +stringThree+""");
The ADXL 345 code and GSM code works individually but on interfacing both together, the data of x, y,z are not displayed on the web service.
How should I store the values of x, y, z in the form of string so that the values can be sent by GSM to web service?