What's picking it up on the server side?
Can you read binary on the server side per
struct MyData
{
float X;
float Y;
float Z;
int T;
} myData;
void setup(void){
float X = -0.2157;
float Y = 0.6015;
float Z = 9.5582;
int T = 143;
myData.X = X;
myData.Y = Y;
myData.Z = Z;
myData.T = T;
Serial.print("binary::");
Serial.write((byte*)&myData, sizeof(myData));
Serial.println("::/binary");}
void loop(void){
}
...prints this on the serial monitor:
binary::và\¾çû?cîA::/binary
...which might be awkward to parse on the server.
Or since accelerometer data probably isn't accurate to the 100 micro-G range, consider a fixed format like: "-0215+0602+9558143
"
char buff[50];
float X=-0.2157;
float Y=0.6015;
float Z=9.5582;
int T=143;
sprintf(buff,"%+05d%+05d%+05d%03d",(int)(X*1000+0.5),(int)(Y*1000+0.5),(int)(Z*1000+0.5),T);
Serial.begin(115200);
Serial.println(buff);