adxl 345 AND gsm--> sending data by HTTP GET command url.

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?

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?

Look at your code. You define String instances based on who knows what variables.

Then, you define local variables are populate them.

Then, you have some other code that never gets called to send the values in the String instances (with the stupid names) to some web service.

How anyone could expect that to actually work is a real mystery.

At the very least, you need to populate the stupidly named String instance AFTER you get data from the accelerometer. AND, you need to stop having global and local variables with the same name. AND, you need to use reasonable names for your String instances. One, Two, and Three do NOT go with x, y, and z.