float x = portOne.read();
What are you using for RS232 level conversion?Code: [Select] float x = portOne.read();The "read" method returns an "int" representing a single character, not a floating point number.You need to buffer the characters representing the float, and use an explicit method like "atof" to convert from ASCII.
the signal from the sensor is 16bits for angles and 10bits for temperature.
int ax = 88;int ay = 89;
char xCommand = 'X';char yCommand = 'Y';
BTW Code: [Select]int ax = 88;int ay = 89; is much easier to read as Code: [Select]char xCommand = 'X';char yCommand = 'Y'; (or whatever "Command" translates to in Portugese)