Sending integer data via XBEE..

I am trying to send data that I get from a imu basically MPU 6050 via XBee to another arduino but on the receiver end i simply can not make sense of the data that is being received. I am using a arduino mega on the transmitter side and on the receiver side i am using an arduino uno with a Xbee sheild from sparkfun. I have tried all kinds of methods to store the incoming data into a int or int array but simply have failed. The code works when i do something like this Serial.write(XBee.read()) but i want to store the data into a variable and am not able to do this till now. Please help me i am really stuck....

I have tried all kinds of methods to store the incoming data into a int or int array but simply have failed.

But, I'm not going to show you any of them, or explain how I concluded that they "have simply failed".

The code works when i do something like this Serial.write(XBee.read()) but i want to store the data into a variable and am not able to do this till now.

So, you can read one character from the XBee, and print it. But, you can't store it an an array until you get the last character. What a shame.

Please help me i am really stuck....

That sounds an awful lot like "Please do my homework for me. I'm going out to play".

So are u here to troll me or to help me ...... :stuck_out_tongue:

zeeman1:
So are u here to troll me or to help me ...... :stuck_out_tongue:

That depends. Are you here as a troll or for help?

If you were here for help, you'd have posted some code, described what it did, and did not do.